[feature] DB creation removed from mssql script, user namespace removed from oracle script, all removedb.sql deleted.

This commit is contained in:
Georgii Petrov
2024-07-17 06:22:52 +03:00
committed by Sergey Konovalov
parent 9822859572
commit 43f83015e0
8 changed files with 9 additions and 21 deletions

View File

@ -45,7 +45,8 @@ jobs:
- name: Creating schema
run: |
docker cp ./schema/mssql/createdb.sql mssql:/
docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -i /createdb.sql
docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -Q "CREATE DATABASE onlyoffice;"
docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -d onlyoffice -i /createdb.sql
- name: Run Jest
run: npm run "integration database tests"

View File

@ -1,4 +0,0 @@
--error: Try to drop default schema of user [ONLYOFFICE]
--DROP SCHEMA onlyoffice;
DROP USER "ONLYOFFICE" CASCADE;

View File

@ -1,7 +1,7 @@
CREATE DATABASE onlyoffice;
GO
-- CREATE DATABASE onlyoffice;
-- GO
USE onlyoffice;
-- USE onlyoffice;
CREATE TABLE doc_changes(
tenant NVARCHAR(255) NOT NULL,

View File

@ -1,2 +0,0 @@
USE onlyoffice;
DROP DATABASE IF EXISTS onlyoffice;

View File

@ -1 +0,0 @@
DROP DATABASE IF EXISTS onlyoffice;

View File

@ -2,12 +2,12 @@
-- Here, "onlyoffice" is a PBD(service) name.
alter session set container = xepdb1;
-- In tables creation section "onlyoffice" is a user name.
-- Oracle uses users as namespaces for tables creation. In "onlyoffice.table_name" onlyoffice is a user name, so table_name exist only at this namespace.
-- ----------------------------
-- Table structure for doc_changes
-- ----------------------------
CREATE TABLE onlyoffice.doc_changes (
CREATE TABLE doc_changes (
tenant NVARCHAR2(255) NOT NULL,
id NVARCHAR2(255) NOT NULL,
change_id NUMBER NOT NULL,
@ -24,7 +24,7 @@ CREATE TABLE onlyoffice.doc_changes (
-- Table structure for task_result
-- ----------------------------
CREATE TABLE onlyoffice.task_result (
CREATE TABLE task_result (
tenant NVARCHAR2(255) NOT NULL,
id NVARCHAR2(255) NOT NULL,
status NUMBER NOT NULL,

View File

@ -1,5 +0,0 @@
-- You must be logged in as SYS(sysdba) user.
-- Here, "onlyoffice" is a PBD(service) name.
alter session set container = xepdb1;
DROP USER onlyoffice CASCADE;

View File

@ -1 +0,0 @@
DROP DATABASE IF EXISTS onlyoffice;