using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DateBaseImplement.Migrations
{
///
public partial class initMigration : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Providers",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(type: "text", nullable: false),
Logo = table.Column(type: "bytea", nullable: false),
Type = table.Column(type: "text", nullable: false),
Number = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Providers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Types",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Types", x => x.Id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Providers");
migrationBuilder.DropTable(
name: "Types");
}
}
}