using System; using Microsoft.EntityFrameworkCore.Migrations; using NodaTime; #nullable disable namespace DysonNetwork.Sphere.Migrations { /// public partial class AddAccountConnection : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "account_connections", columns: table => new { id = table.Column(type: "uuid", nullable: false), provider = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), provided_identifier = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false), access_token = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), refresh_token = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), last_used_at = table.Column(type: "timestamp with time zone", nullable: true), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), deleted_at = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("pk_account_connections", x => x.id); table.ForeignKey( name: "fk_account_connections_accounts_account_id", column: x => x.account_id, principalTable: "accounts", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "ix_account_connections_account_id", table: "account_connections", column: "account_id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "account_connections"); } } }