File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 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) {
365365 query := `IF NOT EXISTS
366366 (SELECT *
367367 FROM sysobjects
368- WHERE id = object_id(N'[dbo ].[` + ss .config .MigrationsTable + `]')
368+ WHERE id = object_id(N'[` + ss . config . SchemaName + ` ].[` + ss .config .MigrationsTable + `]')
369369 AND OBJECTPROPERTY(id, N'IsUserTable') = 1
370370 )
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 );`
372372
373373 if _ , err = ss .conn .ExecContext (context .Background (), query ); err != nil {
374374 return & database.Error {OrigErr : err , Query : []byte (query )}
You can’t perform that action at this time.
0 commit comments