| [2859225] | 1 | using System;
|
|---|
| 2 | using Microsoft.EntityFrameworkCore.Migrations;
|
|---|
| 3 | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|---|
| 4 |
|
|---|
| 5 | #nullable disable
|
|---|
| 6 |
|
|---|
| 7 | namespace iknow_api.Migrations
|
|---|
| 8 | {
|
|---|
| 9 | /// <inheritdoc />
|
|---|
| 10 | public partial class InitialCreate : Migration
|
|---|
| 11 | {
|
|---|
| 12 | /// <inheritdoc />
|
|---|
| 13 | protected override void Up(MigrationBuilder migrationBuilder)
|
|---|
| 14 | {
|
|---|
| 15 | migrationBuilder.CreateTable(
|
|---|
| [9a57e89] | 16 | name: "User",
|
|---|
| [2859225] | 17 | columns: table => new
|
|---|
| 18 | {
|
|---|
| 19 | Id = table.Column<int>(type: "integer", nullable: false)
|
|---|
| 20 | .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|---|
| 21 | Name = table.Column<string>(type: "text", nullable: true),
|
|---|
| 22 | Surname = table.Column<string>(type: "text", nullable: true),
|
|---|
| 23 | Index = table.Column<string>(type: "text", nullable: true),
|
|---|
| 24 | Email = table.Column<string>(type: "text", nullable: true),
|
|---|
| [5b42c8d] | 25 | PasswordHash = table.Column<string>(type: "text", nullable: true),
|
|---|
| [2859225] | 26 | Bday = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|---|
| 27 | CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|---|
| 28 | Role = table.Column<int>(type: "integer", nullable: false)
|
|---|
| 29 | },
|
|---|
| 30 | constraints: table =>
|
|---|
| 31 | {
|
|---|
| [9a57e89] | 32 | table.PrimaryKey("PK_User", x => x.Id);
|
|---|
| [2859225] | 33 | });
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | /// <inheritdoc />
|
|---|
| 37 | protected override void Down(MigrationBuilder migrationBuilder)
|
|---|
| 38 | {
|
|---|
| 39 | migrationBuilder.DropTable(
|
|---|
| [9a57e89] | 40 | name: "User");
|
|---|
| [2859225] | 41 | }
|
|---|
| 42 | }
|
|---|
| 43 | }
|
|---|