mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
[git actions] PR fixes, schema reversion
This commit is contained in:
4
.github/workflows/damengDatabaseTests.yml
vendored
4
.github/workflows/damengDatabaseTests.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
./npm-shrinkwrap.json
|
||||
@ -45,4 +45,4 @@ jobs:
|
||||
docker exec dameng bash -c "cat /createdb.sql | /opt/dmdbms/bin/disql SYSDBA/SYSDBA001:5236"
|
||||
|
||||
- name: Run Jest
|
||||
run: npm exec -c 'cd ./DocService && jest databaseTests --inject-globals=false --config=../tests/jest.config.js'
|
||||
run: npm run "integration database tests"
|
||||
4
.github/workflows/mssqlDatabaseTests.yml
vendored
4
.github/workflows/mssqlDatabaseTests.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
./npm-shrinkwrap.json
|
||||
@ -45,4 +45,4 @@ jobs:
|
||||
docker exec mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P onlYoff1ce -i /createdb.sql
|
||||
|
||||
- name: Run Jest
|
||||
run: npm exec -c 'cd ./DocService && jest databaseTests --inject-globals=false --config=../tests/jest.config.js'
|
||||
run: npm run "integration database tests"
|
||||
4
.github/workflows/mysqlDatabaseTests.yml
vendored
4
.github/workflows/mysqlDatabaseTests.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
./npm-shrinkwrap.json
|
||||
@ -42,4 +42,4 @@ jobs:
|
||||
docker exec mysql mysql -h 127.0.0.1 -u root --password=onlyoffice -D onlyoffice -e 'source /createdb.sql'
|
||||
|
||||
- name: Run Jest
|
||||
run: npm exec -c 'cd ./DocService && jest databaseTests --inject-globals=false --config=../tests/jest.config.js'
|
||||
run: npm run "integration database tests"
|
||||
4
.github/workflows/oracleDatabaseTests.yml
vendored
4
.github/workflows/oracleDatabaseTests.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
./npm-shrinkwrap.json
|
||||
@ -45,4 +45,4 @@ jobs:
|
||||
docker exec oracle sqlplus -s onlyoffice/onlyoffice@//localhost/xepdb1 @/createdb.sql
|
||||
|
||||
- name: Run Jest
|
||||
run: npm exec -c 'cd ./DocService && jest databaseTests --inject-globals=false --config=../tests/jest.config.js'
|
||||
run: npm run "integration database tests"
|
||||
4
.github/workflows/postgreDatabaseTests.yml
vendored
4
.github/workflows/postgreDatabaseTests.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
./npm-shrinkwrap.json
|
||||
@ -42,4 +42,4 @@ jobs:
|
||||
docker exec postgres psql -d onlyoffice -U onlyoffice -a -f /createdb.sql
|
||||
|
||||
- name: Run Jest
|
||||
run: npm exec -c 'cd ./DocService && jest databaseTests --inject-globals=false --config=../tests/jest.config.js'
|
||||
run: npm run "integration database tests"
|
||||
2
.github/workflows/unitTests.yml
vendored
2
.github/workflows/unitTests.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- name: Caching dependencies
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
./npm-shrinkwrap.json
|
||||
|
||||
4249
DocService/npm-shrinkwrap.json
generated
4249
DocService/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
7389
npm-shrinkwrap.json
generated
7389
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ CREATE TABLE doc_changes(
|
||||
user_id_original NVARCHAR(255) NOT NULL,
|
||||
user_name NVARCHAR(255) NOT NULL,
|
||||
change_data NVARCHAR(MAX) NOT NULL,
|
||||
change_date DATETIME2(6) NOT NULL,
|
||||
change_date DATETIME NOT NULL,
|
||||
UNIQUE (tenant, id, change_id)
|
||||
);
|
||||
|
||||
@ -20,8 +20,8 @@ CREATE TABLE task_result (
|
||||
id NVARCHAR(255) NOT NULL,
|
||||
status SMALLINT NOT NULL,
|
||||
status_info INT NOT NULL,
|
||||
created_at DATETIME2(6) DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
last_open_date DATETIME2(6) NOT NULL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
last_open_date DATETIME NOT NULL,
|
||||
user_index DECIMAL DEFAULT 1 NOT NULL,
|
||||
change_id DECIMAL DEFAULT 0 NOT NULL,
|
||||
callback NVARCHAR(MAX) NOT NULL,
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
USE onlyoffice;
|
||||
GO
|
||||
|
||||
DECLARE @nameOfDefaultDatetimeConstraint NVARCHAR(100)
|
||||
SELECT @nameOfDefaultDatetimeConstraint = c.name
|
||||
FROM sys.default_constraints c
|
||||
JOIN sys.objects o ON o.object_id = c.parent_object_id
|
||||
WHERE o.name = 'task_result' AND c.definition = '(getdate())';
|
||||
|
||||
EXECUTE('alter table task_result drop constraint ' + @nameOfDefaultDatetimeConstraint);
|
||||
GO
|
||||
|
||||
ALTER TABLE task_result ALTER column created_at DATETIME2(6) NOT NULL;
|
||||
ALTER TABLE task_result ADD CONSTRAINT DF_task_result_created_at DEFAULT CURRENT_TIMESTAMP FOR created_at;
|
||||
ALTER TABLE task_result ALTER column last_open_date DATETIME2(6) NOT NULL;
|
||||
ALTER TABLE doc_changes ALTER column change_date DATETIME2(6) NOT NULL;
|
||||
GO
|
||||
@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS `doc_changes` (
|
||||
`user_id_original` varchar(255) NOT NULL,
|
||||
`user_name` varchar(255) NOT NULL,
|
||||
`change_data` longtext NOT NULL,
|
||||
`change_date` datetime(6) NOT NULL,
|
||||
`change_date` datetime NOT NULL,
|
||||
PRIMARY KEY (`tenant`, `id`,`change_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
@ -54,8 +54,8 @@ CREATE TABLE IF NOT EXISTS `task_result` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`status` tinyint(3) NOT NULL,
|
||||
`status_info` int(10) NOT NULL,
|
||||
`created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
||||
`last_open_date` datetime(6) NOT NULL,
|
||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_open_date` datetime NOT NULL,
|
||||
`user_index` int(10) unsigned NOT NULL DEFAULT 1,
|
||||
`change_id` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`callback` longtext NOT NULL,
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
DELIMITER DLM00
|
||||
|
||||
DROP PROCEDURE IF EXISTS upgrade750 DLM00
|
||||
|
||||
CREATE PROCEDURE upgrade750()
|
||||
BEGIN
|
||||
SET SQL_SAFE_UPDATES=0;
|
||||
ALTER TABLE `task_result` CHANGE COLUMN `last_open_date` `last_open_date` datetime(6) NOT NULL;
|
||||
ALTER TABLE `task_result` CHANGE COLUMN `created_at` `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6);
|
||||
ALTER TABLE `doc_changes` CHANGE COLUMN `change_date` `change_date` datetime(6) NOT NULL;
|
||||
SET SQL_SAFE_UPDATES=1;
|
||||
END DLM00
|
||||
|
||||
CALL upgrade750() DLM00
|
||||
|
||||
DELIMITER ;
|
||||
@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS "public"."doc_changes" (
|
||||
"user_id_original" varchar(255) COLLATE "default" NOT NULL,
|
||||
"user_name" varchar(255) COLLATE "default" NOT NULL,
|
||||
"change_data" text COLLATE "default" NOT NULL,
|
||||
"change_date" timestamp(6) without time zone NOT NULL,
|
||||
"change_date" timestamp without time zone NOT NULL,
|
||||
PRIMARY KEY ("tenant", "id", "change_id")
|
||||
)
|
||||
WITH (OIDS=FALSE);
|
||||
@ -28,8 +28,8 @@ CREATE TABLE IF NOT EXISTS "public"."task_result" (
|
||||
"id" varchar(255) COLLATE "default" NOT NULL,
|
||||
"status" int2 NOT NULL,
|
||||
"status_info" int4 NOT NULL,
|
||||
"created_at" timestamp(6) without time zone DEFAULT NOW(),
|
||||
"last_open_date" timestamp(6) without time zone NOT NULL,
|
||||
"created_at" timestamp without time zone DEFAULT NOW(),
|
||||
"last_open_date" timestamp without time zone NOT NULL,
|
||||
"user_index" int4 NOT NULL DEFAULT 1,
|
||||
"change_id" int4 NOT NULL DEFAULT 0,
|
||||
"callback" text COLLATE "default" NOT NULL,
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
DO $$
|
||||
BEGIN
|
||||
ALTER TABLE "doc_changes" ALTER COLUMN "change_date" SET DATA TYPE timestamp(6) without time zone;
|
||||
ALTER TABLE "task_result" ALTER COLUMN "last_open_date" SET DATA TYPE timestamp(6) without time zone;
|
||||
ALTER TABLE "task_result" ALTER COLUMN "created_at" DROP DEFAULT;
|
||||
ALTER TABLE "task_result" ALTER COLUMN "created_at" SET DATA TYPE timestamp(6) without time zone;
|
||||
ALTER TABLE "task_result" ALTER COLUMN "created_at" SET DEFAULT now();
|
||||
END;
|
||||
$$
|
||||
Reference in New Issue
Block a user