33
44#nullable disable
55
6- namespace StarWars . Api . Migrations
6+ namespace StarWars . API . Migrations
77{
88 /// <inheritdoc />
99 public partial class Init_DB : Migration
@@ -15,10 +15,9 @@ protected override void Up(MigrationBuilder migrationBuilder)
1515 name : "Movie" ,
1616 columns : table => new
1717 {
18- ID = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : false ) ,
18+ ID = table . Column < string > ( type : "nvarchar(450)" , nullable : false ) ,
1919 Title = table . Column < string > ( type : "nvarchar(100)" , maxLength : 100 , nullable : false ) ,
20- Year = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
21- Type = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
20+ Year = table . Column < int > ( type : "int" , nullable : false ) ,
2221 Poster = table . Column < string > ( type : "nvarchar(500)" , maxLength : 500 , nullable : true ) ,
2322 Price = table . Column < decimal > ( type : "decimal(18,2)" , nullable : false ) ,
2423 IsActive = table . Column < bool > ( type : "bit" , nullable : false ) ,
@@ -35,20 +34,15 @@ protected override void Up(MigrationBuilder migrationBuilder)
3534 columns : table => new
3635 {
3736 ID = table . Column < Guid > ( type : "uniqueidentifier" , nullable : false , defaultValueSql : "NEWID()" ) ,
38- MovieID = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : false ) ,
39- Price = table . Column < decimal > ( type : "decimal(18,2)" , nullable : false ) ,
40- Rated = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
41- Released = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
42- Runtime = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
43- Genre = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
44- Director = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
45- Writer = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
46- Language = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
47- Country = table . Column < string > ( type : "nvarchar(50)" , maxLength : 50 , nullable : true ) ,
48- Awards = table . Column < string > ( type : "nvarchar(500)" , maxLength : 500 , nullable : true ) ,
37+ MovieID = table . Column < string > ( type : "nvarchar(450)" , nullable : false ) ,
38+ Rated = table . Column < string > ( type : "nvarchar(max)" , nullable : true ) ,
39+ Released = table . Column < DateTime > ( type : "datetime2" , nullable : false ) ,
40+ Runtime = table . Column < string > ( type : "nvarchar(max)" , nullable : true ) ,
41+ Genre = table . Column < string > ( type : "nvarchar(max)" , nullable : true ) ,
42+ Director = table . Column < string > ( type : "nvarchar(max)" , nullable : true ) ,
43+ Language = table . Column < string > ( type : "nvarchar(max)" , nullable : true ) ,
4944 Metascore = table . Column < int > ( type : "int" , nullable : false ) ,
5045 Rating = table . Column < decimal > ( type : "decimal(18,2)" , nullable : false ) ,
51- Votes = table . Column < string > ( type : "nvarchar(100)" , maxLength : 100 , nullable : false ) ,
5246 UpdatedOn = table . Column < DateTimeOffset > ( type : "datetimeoffset" , nullable : true ) ,
5347 CreatedOn = table . Column < DateTimeOffset > ( type : "datetimeoffset" , nullable : true )
5448 } ,
0 commit comments