File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -365,10 +365,10 @@ func (ss *SQLServer) ensureVersionTable() (err error) {
365
365
query := `IF NOT EXISTS
366
366
(SELECT *
367
367
FROM sysobjects
368
- WHERE id = object_id(N'[dbo ].[` + ss .config .MigrationsTable + `]')
368
+ WHERE id = object_id(N'[` + ss . config . SchemaName + ` ].[` + ss .config .MigrationsTable + `]')
369
369
AND OBJECTPROPERTY(id, N'IsUserTable') = 1
370
370
)
371
- CREATE TABLE ` + ss .config .MigrationsTable + ` ( version BIGINT PRIMARY KEY NOT NULL, dirty BIT NOT NULL );`
371
+ CREATE TABLE [ ` + ss .config .SchemaName + `].[` + ss . config . MigrationsTable + `] ( version BIGINT PRIMARY KEY NOT NULL, dirty BIT NOT NULL );`
372
372
373
373
if _ , err = ss .conn .ExecContext (context .Background (), query ); err != nil {
374
374
return & database.Error {OrigErr : err , Query : []byte (query )}
You can’t perform that action at this time.
0 commit comments