public override void Up()
{
CreateTable(
"dbo.Albums",
c => new
{
Id = c.Int(nullable: false, identity: true),
Title = c.String(),
Description = c.String(),
Year = c.Int(nullable: false),
ImageUrl = c.String(),
AmazonUrl = c.String(),
SpotifyUrl = c.String(),
ArtistId = c.Int(),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.Artists", t => t.ArtistId)
.Index(t => t.ArtistId);
CreateTable(
"dbo.Artists",
c => new
{
Id = c.Int(nullable: false, identity: true),
ArtistName = c.String(maxLength: 128),
Description = c.String(),
ImageUrl = c.String(maxLength: 256),
AmazonUrl = c.String(maxLength: 256),
})
.PrimaryKey(t => t.Id);
CreateTable(
"dbo.Tracks",
c => new
{
Id = c.Int(nullable: false, identity: true),
AlbumId = c.Int(),
SongName = c.String(maxLength: 128),
Length = c.String(maxLength: 10),
Bytes = c.Int(nullable: false),
UnitPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.Albums", t => t.AlbumId)
.Index(t => t.AlbumId);
CreateTable(
"dbo.Users",
c => new
{
Id = c.Int(nullable: false, identity: true),
Username = c.String(),
Password = c.String(),
Fullname = c.String(),
})
.PrimaryKey(t => t.Id);
}