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] [32minfo[39m: =======================================
2019-12-12T12:41:20.691182204Z 2019-12-12T12:41:20.690Z [MASTER] [32minfo[39m: = Wiki.js 2.0.12 ======================
2019-12-12T12:41:20.691196104Z 2019-12-12T12:41:20.690Z [MASTER] [32minfo[39m: =======================================
2019-12-12T12:41:20.691201904Z 2019-12-12T12:41:20.691Z [MASTER] [32minfo[39m: Initializing...
2019-12-12T12:41:22.426132613Z 2019-12-12T12:41:22.425Z [MASTER] [32minfo[39m: Connecting to database...
2019-12-12T12:41:22.792272098Z 2019-12-12T12:41:22.792Z [MASTER] [32minfo[39m: 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] [31merror[39m: Database Initialization Error: ALTER TABLE [pages] alter column [content] VARCHAR(max), [render] VARCHAR(max) - Incorrect syntax near ','.
Host Info (please complete the following information):
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.
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.