feat: finish the homepage plugin, move service links and canvas out of core (B19)

This commit is contained in:
LukeGus committed 2026-09-24 15:07:25 -05:00
1 parent 21937a6b02
commit d4ec444558
256 files changed
+27365 -9077

No files matched your search

@@ -0,0 +1,36 @@
-- homepage 0001: adopt_homepage_tables
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS `homepage_items` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`type_id` text NOT NULL,
`title` text,
`config` text NOT NULL DEFAULT ('{}'),
`folder_id` int,
`sync_id` varchar(255) UNIQUE,
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
RENAME TABLE `homepage_items` TO `p_homepage_homepage_items`;
CREATE TABLE IF NOT EXISTS `homepage_layouts` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL UNIQUE,
`layout` text NOT NULL DEFAULT ('{}'),
`updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
RENAME TABLE `homepage_layouts` TO `p_homepage_homepage_layouts`;
CREATE TABLE IF NOT EXISTS `dashboard_service_links` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`user_id` varchar(255) NOT NULL,
`label` text NOT NULL,
`url` text NOT NULL,
`order` int NOT NULL DEFAULT 0,
`sync_id` varchar(255) UNIQUE,
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
RENAME TABLE `dashboard_service_links` TO `p_homepage_dashboard_service_links`;
@@ -0,0 +1,38 @@
-- homepage 0001: adopt_homepage_tables
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "homepage_items" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"type_id" text NOT NULL,
"title" text,
"config" text NOT NULL DEFAULT '{}',
"folder_id" integer,
"sync_id" varchar(255) UNIQUE,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_homepage_items_user_id" ON "homepage_items" ("user_id");
ALTER TABLE "homepage_items" RENAME TO "p_homepage_homepage_items";
CREATE TABLE IF NOT EXISTS "homepage_layouts" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL UNIQUE,
"layout" text NOT NULL DEFAULT '{}',
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
ALTER TABLE "homepage_layouts" RENAME TO "p_homepage_homepage_layouts";
CREATE TABLE IF NOT EXISTS "dashboard_service_links" (
"id" serial PRIMARY KEY,
"user_id" varchar(255) NOT NULL,
"label" text NOT NULL,
"url" text NOT NULL,
"order" integer NOT NULL DEFAULT 0,
"sync_id" varchar(255) UNIQUE,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_dashboard_service_links_user_id" ON "dashboard_service_links" ("user_id");
ALTER TABLE "dashboard_service_links" RENAME TO "p_homepage_dashboard_service_links";
+132
View File
@@ -0,0 +1,132 @@
{
"version": 1,
"tables": {
"homepage_items": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"typeId": {
"type": "text",
"notNull": true
},
"title": {
"type": "text"
},
"config": {
"type": "text",
"notNull": true,
"defaultValue": "{}"
},
"folderId": {
"type": "integer"
},
"syncId": {
"type": "varchar",
"length": 255,
"unique": true
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
},
"updatedAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_homepage_items_user_id",
"columns": ["userId"]
}
],
"adopts": "homepage_items"
},
"homepage_layouts": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true,
"unique": true
},
"layout": {
"type": "text",
"notNull": true,
"defaultValue": "{}"
},
"updatedAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [],
"adopts": "homepage_layouts"
},
"dashboard_service_links": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"label": {
"type": "text",
"notNull": true
},
"url": {
"type": "text",
"notNull": true
},
"order": {
"type": "integer",
"notNull": true,
"defaultValue": 0
},
"syncId": {
"type": "varchar",
"length": 255,
"unique": true
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
},
"updatedAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_dashboard_service_links_user_id",
"columns": ["userId"]
}
],
"adopts": "dashboard_service_links"
}
}
}
@@ -0,0 +1,38 @@
-- homepage 0001: adopt_homepage_tables
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "homepage_items" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"type_id" text NOT NULL,
"title" text,
"config" text NOT NULL DEFAULT '{}',
"folder_id" integer,
"sync_id" text UNIQUE,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_homepage_items_user_id" ON "homepage_items" ("user_id");
ALTER TABLE "homepage_items" RENAME TO "p_homepage_homepage_items";
CREATE TABLE IF NOT EXISTS "homepage_layouts" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL UNIQUE,
"layout" text NOT NULL DEFAULT '{}',
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
ALTER TABLE "homepage_layouts" RENAME TO "p_homepage_homepage_layouts";
CREATE TABLE IF NOT EXISTS "dashboard_service_links" (
"id" integer PRIMARY KEY AUTOINCREMENT,
"user_id" text NOT NULL,
"label" text NOT NULL,
"url" text NOT NULL,
"order" integer NOT NULL DEFAULT 0,
"sync_id" text UNIQUE,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_dashboard_service_links_user_id" ON "dashboard_service_links" ("user_id");
ALTER TABLE "dashboard_service_links" RENAME TO "p_homepage_dashboard_service_links";