{"modulePath":"github.com/solvedata/migrate/v4","version":"v4.8.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sqlserver\n\n## Variables\n\n```go\nvar (\n\tErrNilConfig      = fmt.Errorf(\"no config\")\n\tErrNoDatabaseName = fmt.Errorf(\"no database name\")\n\tErrNoSchema       = fmt.Errorf(\"no schema\")\n\tErrDatabaseDirty  = fmt.Errorf(\"database is dirty\")\n)\n```\n\n```go\nvar DefaultMigrationsTable = \"schema_migrations\"\n```\nDefaultMigrationsTable is the name of the migrations table in the database\n\n## Functions\n\n```go\nfunc WithInstance(instance *sql.DB, config *Config) (database.Driver, error)\n```\nWithInstance returns a database instance from an already created database connection.\n\nNote that the deprecated \\`mssql\\` driver is not supported. Please use the newer \\`sqlserver\\` driver.\n\n## Types\n\n```go\ntype Config struct {\n\tMigrationsTable string\n\tDatabaseName    string\n\tSchemaName      string\n}\n```\nConfig for database\n\n```go\ntype SQLServer struct {\n\t// contains filtered or unexported fields\n}\n```\nSQL Server connection\n\n```go\nfunc (ss *SQLServer) Close() error\n```\nClose the database connection\n\n```go\nfunc (ss *SQLServer) Drop() error\n```\nDrop all tables from the database.\n\n```go\nfunc (ss *SQLServer) Lock() error\n```\nLock creates an advisory local on the database to prevent multiple migrations from running at the same time.\n\n```go\nfunc (ss *SQLServer) Open(url string) (database.Driver, error)\n```\nOpen a connection to the database\n\n```go\nfunc (ss *SQLServer) Run(migration io.Reader) error\n```\nRun the migrations for the database\n\n```go\nfunc (ss *SQLServer) SetVersion(version int, dirty bool) error\n```\nSetVersion for the current database\n\n```go\nfunc (ss *SQLServer) Unlock() error\n```\nUnlock froms the migration lock from the database\n\n```go\nfunc (ss *SQLServer) Version() (version int, dirty bool, err error)\n```\nVersion of the current database state\n\n","path":"github.com/solvedata/migrate/v4/database/sqlserver","name":"sqlserver","synopsis":"","isRedistributable":true}
