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/PostgreSql/20241028033704_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

54 lines
2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace EllieBot.Migrations.PostgreSql
{
/// <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("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
position = table.Column<int>(type: "integer", nullable: false),
price = table.Column<long>(type: "bigint", nullable: false),
ownerid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
color = table.Column<long>(type: "bigint", nullable: false),
text = table.Column<string>(type: "character varying(256)", 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");
}
}
}