示例#1
0
        public void CreateSchemaVersion()
        {
            MigrationRepository repo = new MigrationRepository(ConnectionInfo);

            repo.ExecuteNonQuery("create table dbo.SchemaVersion(VersionTimestamp nvarchar(14) not null default(''))");

            repo.ExecuteNonQuery("insert into dbo.SchemaVersion(VersionTimestamp)Values('')");
        }
示例#2
0
        private void CreateNewDatabase(string databaseName)
        {
            MigrationRepository masterRepo = new MigrationRepository(MasterConnectionInfo);

            masterRepo.ExecuteNonQuery("create database " + databaseName);
        }
示例#3
0
        public string GetSchemaVersion()
        {
            MigrationRepository repo = new MigrationRepository(ConnectionInfo);

            return repo.ExecuteScalar("select VersionTimestamp from dbo.SchemaVersion").ToString();
        }
示例#4
0
        public void ExecuteMigrtionScript(string migrationAndSchemaVersionUpdateScript)
        {
            MigrationRepository repo = new MigrationRepository(ConnectionInfo);

            repo.ExecuteNonQuery(migrationAndSchemaVersionUpdateScript);
        }