Skip to content

Instantly share code, notes, and snippets.

@carloscds
Created March 16, 2020 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carloscds/eabc79f87d6abbda10a6c5b629ac4664 to your computer and use it in GitHub Desktop.
Save carloscds/eabc79f87d6abbda10a6c5b629ac4664 to your computer and use it in GitHub Desktop.
public partial class CriacaoBanco : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Clientes",
c => new
{
ID = c.Int(nullable: false, identity: true),
Nome = c.String(maxLength: 100),
Cidade = c.String(),
UF = c.String(),
})
.PrimaryKey(t => t.ID)
.Index(t => t.Nome, name: "MeuIndice");
}
public override void Down()
{
DropIndex("dbo.Clientes", "MeuIndice");
DropTable("dbo.Clientes");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment