public SqliteFixture() : base(new SqliteConnection($"Data Source={Guid.NewGuid()}.db"), new SqliteDialect())
        {
            var runner = new SqliteMigrationRunner(Connection.ConnectionString);

            runner.CreateDatabaseIfNotExists();
            runner.MigrateUp(typeof(TMigrationInfo).Assembly, typeof(TMigrationInfo).Namespace);
        }
Example #2
0
File: Add.cs Project: qiqi545/HQ
        private static void MigrateToLatest(string connectionString, IdentityOptionsExtended identityOptions)
        {
            var runner = new SqliteMigrationRunner(connectionString);

            if (identityOptions.Stores.CreateIfNotExists)
            {
                runner.CreateDatabaseIfNotExists();
            }

            if (identityOptions.Stores.MigrateOnStartup)
            {
                runner.MigrateUp(typeof(CreateIdentitySchema).Assembly, typeof(CreateIdentitySchema).Namespace);
            }
        }