Skip to content

Instantly share code, notes, and snippets.

@nishanc
Created May 4, 2021 12:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nishanc/5c9ecca409f8d239a35ac2d59e40be2f to your computer and use it in GitHub Desktop.
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "TPCStudents",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CGPA = table.Column<string>(type: "nvarchar(max)", nullable: true),
Major = table.Column<string>(type: "nvarchar(max)", nullable: true),
Username = table.Column<string>(type: "nvarchar(max)", nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TPCStudents", x => x.Id);
});
migrationBuilder.CreateTable(
name: "TPCTeachers",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Designation = table.Column<string>(type: "nvarchar(max)", nullable: true),
Speciality = table.Column<string>(type: "nvarchar(max)", nullable: true),
Username = table.Column<string>(type: "nvarchar(max)", nullable: false),
Email = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TPCTeachers", x => x.Id);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment