56 lines
2.1 KiB
C#
56 lines
2.1 KiB
C#
namespace Hermes.Migrations
|
|
{
|
|
using System;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
public partial class V1 : DbMigration
|
|
{
|
|
public override void Up()
|
|
{
|
|
CreateTable(
|
|
"dbo.Citoyens",
|
|
c => new
|
|
{
|
|
Id = c.Int(nullable: false, identity: true),
|
|
Civilite = c.String(maxLength: 4000),
|
|
Nom = c.String(maxLength: 4000),
|
|
NomNaissance = c.String(maxLength: 4000),
|
|
Prenom = c.String(maxLength: 4000),
|
|
DateNaissance = c.DateTime(),
|
|
Profession = c.String(maxLength: 4000),
|
|
TypeResidence = c.Boolean(nullable: false),
|
|
Mail = c.String(maxLength: 4000),
|
|
Tel = c.String(maxLength: 4000),
|
|
TelPort = c.String(maxLength: 4000),
|
|
Quartier = c.String(maxLength: 4000),
|
|
Adresse = c.String(maxLength: 4000),
|
|
AdresseBatiment = c.String(maxLength: 4000),
|
|
AdresseExt = c.String(maxLength: 4000),
|
|
AdresseExtCP = c.String(maxLength: 4000),
|
|
AdresseExtVille = c.String(maxLength: 4000),
|
|
DateCreation = c.DateTime(nullable: false),
|
|
DateModification = c.DateTime(nullable: false),
|
|
})
|
|
.PrimaryKey(t => t.Id);
|
|
|
|
CreateTable(
|
|
"dbo.Preferences",
|
|
c => new
|
|
{
|
|
Id = c.Int(nullable: false, identity: true),
|
|
VilleCP = c.String(maxLength: 4000),
|
|
Ville = c.String(maxLength: 4000),
|
|
SmsApiKey = c.String(maxLength: 4000),
|
|
})
|
|
.PrimaryKey(t => t.Id);
|
|
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
DropTable("dbo.Preferences");
|
|
DropTable("dbo.Citoyens");
|
|
}
|
|
}
|
|
}
|