private void CreateTables(MemoryDatabase db) { db.ExecuteCommand(@" CREATE TABLE IF NOT EXISTS Employee ( [Id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, [Name] NVARCHAR(64) NOT NULL )"); Assert.IsTrue(db.ExecuteScalar <int>("SELECT count(*) from [Employee]") == 0); }
private void CreateComplexDatabaseTables(MemoryDatabase db) { // var sql = @"CREATE TABLE [main].[Bron]( // [Id] [varchar](50) NOT NULL, // [Omschrijving] [varchar](100) NULL, // CONSTRAINT [PK_Bron] PRIMARY KEY //( // [Id] ASC //)) //"; // db.ExecuteCommand(sql); var sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.PartitionKey.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Bron.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.BronEenheid.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Batch.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.SourceFileMetadata.sql"); db.ExecuteCommand(sql); //sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.BatchSourceFile.sql"); //db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Administratie.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Aanlevering.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.EntiteitType.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Entiteit.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.EntiteitWaarde.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.AffectedBatch.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.AffectedAanlevering.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.AffectedPayrollRelatie.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.ProcessedEvent.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Log.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.Event.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.FileLog.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.ImportMappingType.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.ImportTableMapping.sql"); db.ExecuteCommand(sql); sql = GetCreateTableScript(@"E:\Ontwikkel\Test\DatabaseInMemory\test\Scripts\Tables\PayrollData.ImportColumnMapping.sql"); db.ExecuteCommand(sql); }