Skip to content

Commit cad913d

Browse files
authored
fix: update SQL Server barrier creation script (#85)
fix NOT use the dtm_barrier database when the DB exist and table does NOT exist
1 parent fc4acfe commit cad913d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sqls/barrier.sqlserver.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = 'dtm_barrier')
22
BEGIN
33
CREATE DATABASE dtm_barrier
4-
USE dtm_barrier
54
END
65

76
GO
87

8+
USE dtm_barrier
9+
GO
10+
911
IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[barrier]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
1012
BEGIN
1113
DROP TABLE [dbo].[barrier]

0 commit comments

Comments
 (0)