Initial first release

This commit is contained in:
2025-06-29 15:03:00 -04:00
parent 9e4959af27
commit 3200b2bdd3
14 changed files with 501 additions and 127 deletions

View File

@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "Response" (
"id" TEXT NOT NULL PRIMARY KEY,
"from" TEXT NOT NULL,
"to" TEXT NOT NULL,
"content" TEXT NOT NULL,
"createdAt" DATETIME,
"processedAt" DATETIME
);
-- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"userFqn" TEXT NOT NULL,
"receivedAt" DATETIME
);
-- CreateIndex
CREATE UNIQUE INDEX "User_userFqn_key" ON "User"("userFqn");

View File

@ -0,0 +1,20 @@
/*
Warnings:
- You are about to drop the column `receivedAt` on the `User` table. All the data in the column will be lost.
*/
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"userFqn" TEXT NOT NULL,
"lastRespondedTo" DATETIME
);
INSERT INTO "new_User" ("id", "userFqn") SELECT "id", "userFqn" FROM "User";
DROP TABLE "User";
ALTER TABLE "new_User" RENAME TO "User";
CREATE UNIQUE INDEX "User_userFqn_key" ON "User"("userFqn");
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;

View File

@ -0,0 +1,25 @@
/*
Warnings:
- The primary key for the `Response` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `content` on the `Response` table. All the data in the column will be lost.
- You are about to drop the column `from` on the `Response` table. All the data in the column will be lost.
- You are about to alter the column `id` on the `Response` table. The data in that column could be lost. The data in that column will be cast from `String` to `Int`.
*/
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Response" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"to" TEXT NOT NULL,
"request" TEXT,
"response" TEXT,
"createdAt" DATETIME,
"processedAt" DATETIME
);
INSERT INTO "new_Response" ("createdAt", "id", "processedAt", "to") SELECT "createdAt", "id", "processedAt", "to" FROM "Response";
DROP TABLE "Response";
ALTER TABLE "new_Response" RENAME TO "Response";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;

View File

@ -0,0 +1,17 @@
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Response" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"pleromaNotificationId" TEXT NOT NULL DEFAULT 'null',
"to" TEXT NOT NULL,
"request" TEXT,
"response" TEXT,
"createdAt" DATETIME,
"processedAt" DATETIME
);
INSERT INTO "new_Response" ("createdAt", "id", "processedAt", "request", "response", "to") SELECT "createdAt", "id", "processedAt", "request", "response", "to" FROM "Response";
DROP TABLE "Response";
ALTER TABLE "new_Response" RENAME TO "Response";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;

View File

@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"