1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-04 19:07:50 +01:00

Fix initial database creation in run_migrations.sh (#2009)

This commit is contained in:
Thomas Avery 2022-05-23 11:35:39 -05:00 committed by GitHub
parent 719abc7e61
commit dded4e7780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,11 @@ END;
IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'migrations_$DATABASE') IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = 'migrations_$DATABASE')
BEGIN BEGIN
CREATE DATABASE migrations_$DATABASE; CREATE DATABASE migrations_$DATABASE;
END;
GO
IF OBJECT_ID('[migrations_$DATABASE].[dbo].[migrations]') IS NULL
BEGIN
CREATE TABLE [migrations_$DATABASE].[dbo].[migrations] ( CREATE TABLE [migrations_$DATABASE].[dbo].[migrations] (
[Id] INT IDENTITY(1,1) PRIMARY KEY, [Id] INT IDENTITY(1,1) PRIMARY KEY,
[Filename] NVARCHAR(MAX) NOT NULL, [Filename] NVARCHAR(MAX) NOT NULL,