mirror of
https://github.com/bitwarden/server.git
synced 2025-01-02 18:47:44 +01:00
Fix initial database creation in run_migrations.sh (#2009)
This commit is contained in:
parent
719abc7e61
commit
dded4e7780
@ -36,11 +36,16 @@ END;
|
||||
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'migrations_$DATABASE')
|
||||
BEGIN
|
||||
CREATE DATABASE migrations_$DATABASE;
|
||||
CREATE TABLE [migrations_$DATABASE].[dbo].[migrations] (
|
||||
END;
|
||||
|
||||
GO
|
||||
IF OBJECT_ID('[migrations_$DATABASE].[dbo].[migrations]') IS NULL
|
||||
BEGIN
|
||||
CREATE TABLE [migrations_$DATABASE].[dbo].[migrations] (
|
||||
[Id] INT IDENTITY(1,1) PRIMARY KEY,
|
||||
[Filename] NVARCHAR(MAX) NOT NULL,
|
||||
[CreationDate] DATETIME2 (7) NULL,
|
||||
);
|
||||
);
|
||||
END;"
|
||||
|
||||
/opt/mssql-tools/bin/sqlcmd -S $SERVER -d master -U $USER -P $PASSWD -I -Q "$QUERY"
|
||||
|
Loading…
Reference in New Issue
Block a user