Skip to content

Instantly share code, notes, and snippets.

@mgroves
Last active August 29, 2015 13:58
[Migration(1)]
public class CreateUserTable : Migration
{
public override void Up()
{
Create.Table("myusertable")
.WithColumn("id").AsInt32().NotNullable().PrimaryKey().Identity()
.WithColumn("name").AsString(100).NotNullable()
.WithColumn("birthdate").AsDateTime().NotNullable()
.WithColumn("address").AsString(100).NotNullable()
.WithColumn("email").AsString(200).Nullable();
}
public override void Down()
{
Delete.Table("myusertable");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment