public CreateTable ( string name, Action |
||
name | string | |
table | Action |
|
Résultat |
public void EnsureMigrationRecordsExists() { try { Logger.Debug("DataMigrationManager", "Check the table MigrationRecords exists"); //Check whether the table already existed _migrationRecordRepository.Fetch(m => true); } catch (Exception e) { Logger.Debug("DataMigrationManager", "MigrationRecords does not exist"); SchemaBuilder builder = new SchemaBuilder(_interpreter); builder.CreateTable("MigrationRecords", t => t.Column <int>("Id", column => column.PrimaryKey().Identity()) .Column <string>("Version", column => column.WithLength(16)) .Column <string>("TableName")); } }
public void EnsureMigrationRecordsExists() { try { Logger.Debug("DataMigrationManager", "Check the table MigrationRecords exists"); //Check whether the table already existed _migrationRecordRepository.Fetch(m => true); } catch(Exception e) { Logger.Debug("DataMigrationManager", "MigrationRecords does not exist"); SchemaBuilder builder = new SchemaBuilder(_interpreter); builder.CreateTable("MigrationRecords", t => t.Column<int>("Id", column => column.PrimaryKey().Identity()) .Column<string>("Version", column => column.WithLength(16)) .Column<string>("TableName")); } }