20210415101940_AddOperatorModel.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace Gateway.POS.Migrations
  4. {
  5. public partial class AddOperatorModel : Migration
  6. {
  7. protected override void Up(MigrationBuilder migrationBuilder)
  8. {
  9. migrationBuilder.CreateTable(
  10. name: "Operators",
  11. columns: table => new
  12. {
  13. Id = table.Column<int>(type: "INTEGER", nullable: false)
  14. .Annotation("Sqlite:Autoincrement", true),
  15. Name = table.Column<string>(type: "TEXT", nullable: true),
  16. Password = table.Column<string>(type: "TEXT", nullable: true),
  17. Description = table.Column<string>(type: "TEXT", nullable: true),
  18. CreatedTimestamp = table.Column<DateTime>(type: "TEXT", nullable: false)
  19. },
  20. constraints: table =>
  21. {
  22. table.PrimaryKey("PK_Operators", x => x.Id);
  23. });
  24. }
  25. protected override void Down(MigrationBuilder migrationBuilder)
  26. {
  27. migrationBuilder.DropTable(
  28. name: "Operators");
  29. }
  30. }
  31. }