Wiki: Could not start wiki.js after Upgrade from 2.0.0 rc17 to 2.0.12

Created on 12 Dec 2019  路  4Comments  路  Source: Requarks/wiki

Describe the bug
After start using new docker image service can not be started. In docker log file there is following error:
2019-12-12T12:41:20.682648321Z 2019-12-12T12:41:20.681Z [MASTER] info: ======================================= 2019-12-12T12:41:20.691182204Z 2019-12-12T12:41:20.690Z [MASTER] info: = Wiki.js 2.0.12 ====================== 2019-12-12T12:41:20.691196104Z 2019-12-12T12:41:20.690Z [MASTER] info: ======================================= 2019-12-12T12:41:20.691201904Z 2019-12-12T12:41:20.691Z [MASTER] info: Initializing... 2019-12-12T12:41:22.426132613Z 2019-12-12T12:41:22.425Z [MASTER] info: Connecting to database... 2019-12-12T12:41:22.792272098Z 2019-12-12T12:41:22.792Z [MASTER] info: Database Connection Successful [ OK ] 2019-12-12T12:41:22.974589941Z migration file "2.0.0-rc.29.js" failed 2019-12-12T12:41:22.975052041Z migration failed with error: ALTER TABLE [pages] alter column [content] VARCHAR(max), [render] VARCHAR(max) - Incorrect syntax near ','. 2019-12-12T12:41:23.009938472Z 2019-12-12T12:41:23.009Z [MASTER] error: Database Initialization Error: ALTER TABLE [pages] alter column [content] VARCHAR(max), [render] VARCHAR(max) - Incorrect syntax near ','.

Host Info (please complete the following information):

  • OS: Docker
  • Wiki.js version: 2.0.12
  • Database engine: MSSQL

Most helpful comment

Seeing the same exact error. MSSQL does not seem to support multiple alter columns in one command.
For a quick workaround I did altered by hand and then inserted the batch completion by hand:

INSERT INTO dbo.migrations
(
name,
batch,
migration_time
)
VALUES
( N'2.0.0-rc.29.js', -- name - nvarchar(255)
1, -- batch - int
SYSDATETIME() -- migration_time - datetime2(7)
)

to get it work.

All 4 comments

Seeing the same exact error. MSSQL does not seem to support multiple alter columns in one command.
For a quick workaround I did altered by hand and then inserted the batch completion by hand:

INSERT INTO dbo.migrations
(
name,
batch,
migration_time
)
VALUES
( N'2.0.0-rc.29.js', -- name - nvarchar(255)
1, -- batch - int
SYSDATETIME() -- migration_time - datetime2(7)
)

to get it work.

Seeing the same exact error. MSSQL does not seem to support multiple alter columns in one command.
For a quick workaround I did altered by hand and then inserted the batch completion by hand:

INSERT INTO dbo.migrations
(
name,
batch,
migration_time
)
VALUES
( N'2.0.0-rc.29.js', -- name - nvarchar(255)
1, -- batch - int
SYSDATETIME() -- migration_time - datetime2(7)
)

to get it work.

Thanks will try this

@fimiiflin Thanks. Done the same and it is working now

The workaround above worked for me too. I have made a stab at a change to Knex to fix the underlying issue https://github.com/knex/knex/pull/3581.

Was this page helpful?
0 / 5 - 0 ratings