Created
March 16, 2020 19:30
-
-
Save carloscds/eabc79f87d6abbda10a6c5b629ac4664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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