This repository has been archived on 2024-12-22. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
elliebot/src/EllieBot/Migrations/Sqlite/20241028033656_ncanvas.cs
Toastie 7cd0026c3e
.nc and related commands.
You can set pixel colors (and text) on a 500x350 canvas, pepega version of r/place
You use currency to set pixels.
see whole canvas: .nc
set pixel: .ncsp <pos> <color> <text?>
get pixel: .ncp <pos>
zoom: .ncz <pos> or .ncz x y
2024-10-29 12:44:28 +13:00

53 lines
No EOL
1.8 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EllieBot.Migrations
{
/// <inheritdoc />
public partial class ncanvas : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "NCPixel",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Position = table.Column<int>(type: "INTEGER", nullable: false),
Price = table.Column<long>(type: "INTEGER", nullable: false),
OwnerId = table.Column<ulong>(type: "INTEGER", nullable: false),
Color = table.Column<uint>(type: "INTEGER", nullable: false),
Text = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_NCPixel", x => x.Id);
table.UniqueConstraint("AK_NCPixel_Position", x => x.Position);
});
migrationBuilder.CreateIndex(
name: "IX_DiscordUser_Username",
table: "DiscordUser",
column: "Username");
migrationBuilder.CreateIndex(
name: "IX_NCPixel_OwnerId",
table: "NCPixel",
column: "OwnerId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "NCPixel");
migrationBuilder.DropIndex(
name: "IX_DiscordUser_Username",
table: "DiscordUser");
}
}
}