chore: format with csharpier
This commit is contained in:
parent
2f516dcb73
commit
4f54077c68
59 changed files with 2000 additions and 942 deletions
|
|
@ -20,23 +20,22 @@ namespace Catalogger.Backend.Database.Migrations
|
|||
id = table.Column<long>(type: "bigint", nullable: false),
|
||||
channels = table.Column<Guild.ChannelConfig>(type: "jsonb", nullable: false),
|
||||
banned_systems = table.Column<List<string>>(type: "text[]", nullable: false),
|
||||
key_roles = table.Column<List<long>>(type: "bigint[]", nullable: false)
|
||||
key_roles = table.Column<List<long>>(type: "bigint[]", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_guilds", x => x.id);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ignored_messages",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
},
|
||||
columns: table => new { id = table.Column<long>(type: "bigint", nullable: false) },
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_ignored_messages", x => x.id);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "invites",
|
||||
|
|
@ -44,12 +43,13 @@ namespace Catalogger.Backend.Database.Migrations
|
|||
{
|
||||
code = table.Column<string>(type: "text", nullable: false),
|
||||
guild_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
name = table.Column<string>(type: "text", nullable: false)
|
||||
name = table.Column<string>(type: "text", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_invites", x => x.code);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "messages",
|
||||
|
|
@ -65,12 +65,13 @@ namespace Catalogger.Backend.Database.Migrations
|
|||
username = table.Column<byte[]>(type: "bytea", nullable: false),
|
||||
content = table.Column<byte[]>(type: "bytea", nullable: false),
|
||||
metadata = table.Column<byte[]>(type: "bytea", nullable: true),
|
||||
attachment_size = table.Column<int>(type: "integer", nullable: false)
|
||||
attachment_size = table.Column<int>(type: "integer", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_messages", x => x.id);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "watchlists",
|
||||
|
|
@ -78,38 +79,39 @@ namespace Catalogger.Backend.Database.Migrations
|
|||
{
|
||||
guild_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
user_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
added_at = table.Column<Instant>(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()"),
|
||||
added_at = table.Column<Instant>(
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
defaultValueSql: "now()"
|
||||
),
|
||||
moderator_id = table.Column<long>(type: "bigint", nullable: false),
|
||||
reason = table.Column<string>(type: "text", nullable: false)
|
||||
reason = table.Column<string>(type: "text", nullable: false),
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_watchlists", x => new { x.guild_id, x.user_id });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_invites_guild_id",
|
||||
table: "invites",
|
||||
column: "guild_id");
|
||||
column: "guild_id"
|
||||
);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "guilds");
|
||||
migrationBuilder.DropTable(name: "guilds");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ignored_messages");
|
||||
migrationBuilder.DropTable(name: "ignored_messages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "invites");
|
||||
migrationBuilder.DropTable(name: "invites");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "messages");
|
||||
migrationBuilder.DropTable(name: "messages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "watchlists");
|
||||
migrationBuilder.DropTable(name: "watchlists");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue