44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using System.Collections;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Lactose.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class VectorExtensions : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterDatabase()
|
|
.Annotation("Npgsql:PostgresExtension:vector", ",,");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Hash",
|
|
table: "Assets");
|
|
migrationBuilder.AddColumn<BitArray>(
|
|
name: "Hash",
|
|
table: "Assets",
|
|
type: "bit(64)",
|
|
nullable: false,
|
|
defaultValue: new BitArray(64));
|
|
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterDatabase()
|
|
.OldAnnotation("Npgsql:PostgresExtension:vector", ",,");
|
|
|
|
migrationBuilder.DropColumn("Hash", "Assets");
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "Hash",
|
|
table: "Assets",
|
|
type: "numeric(20,0)",
|
|
nullable: false);
|
|
}
|
|
}
|
|
}
|