Skip to content

Commit

Permalink
redo schema for completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCorrigan committed Oct 4, 2024
1 parent b813a1e commit 22a8631
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 2,704 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
CREATE TABLE `admin_users` (
`id` integer PRIMARY KEY NOT NULL,
`created_at` text DEFAULT (current_timestamp) NOT NULL,
`did` text NOT NULL
);
--> statement-breakpoint
CREATE TABLE `labelled_profiles` (
`id` integer PRIMARY KEY NOT NULL,
`did` text NOT NULL,
`is_hidden` integer DEFAULT false NOT NULL,
`labels` text
`labels` text,
`created_at` text DEFAULT (current_timestamp) NOT NULL,
`updated_at` text DEFAULT (current_timestamp) NOT NULL
);
--> statement-breakpoint
CREATE TABLE `moderation_events` (
Expand All @@ -13,7 +21,7 @@ CREATE TABLE `moderation_events` (
`subject_rkey` text,
`subject_cid` text,
`created_by` text NOT NULL,
`created_at` text NOT NULL,
`created_at` text DEFAULT (current_timestamp) NOT NULL,
`labels_added` text,
`labels_removed` text,
`report_type` text
Expand All @@ -29,9 +37,11 @@ CREATE TABLE `reports` (
`subject_rkey` text,
`subject_cid` text,
`created_by` text NOT NULL,
`created_at` text NOT NULL,
`created_at` text DEFAULT (current_timestamp) NOT NULL,
`creator_comment` text,
`report_reason` text
`report_reason` text,
`status` text DEFAULT 'pending'
);
--> statement-breakpoint
CREATE UNIQUE INDEX `admin_users_did_unique` ON `admin_users` (`did`);--> statement-breakpoint
CREATE UNIQUE INDEX `labelled_profiles_did_unique` ON `labelled_profiles` (`did`);
1 change: 0 additions & 1 deletion packages/frontpage/drizzle/0003_superb_lilandra.sql

This file was deleted.

7 changes: 0 additions & 7 deletions packages/frontpage/drizzle/0004_jittery_random.sql

This file was deleted.

14 changes: 0 additions & 14 deletions packages/frontpage/drizzle/0005_remarkable_mister_fear.sql

This file was deleted.

71 changes: 68 additions & 3 deletions packages/frontpage/drizzle/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,48 @@
{
"version": "6",
"dialect": "sqlite",
"id": "0374b59d-b2ce-4b76-8dde-835281e84750",
"id": "d5fcf5e1-b731-4ff1-9811-4dbf5002f67e",
"prevId": "dcb0c712-e046-420d-9fc3-bdcc9f58fa45",
"tables": {
"admin_users": {
"name": "admin_users",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(current_timestamp)"
},
"did": {
"name": "did",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {
"admin_users_did_unique": {
"name": "admin_users_did_unique",
"columns": [
"did"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"beta_users": {
"name": "beta_users",
"columns": {
Expand Down Expand Up @@ -294,6 +333,22 @@
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(current_timestamp)"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(current_timestamp)"
}
},
"indexes": {
Expand Down Expand Up @@ -366,7 +421,8 @@
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
"autoincrement": false,
"default": "(current_timestamp)"
},
"labels_added": {
"name": "labels_added",
Expand Down Expand Up @@ -810,7 +866,8 @@
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
"autoincrement": false,
"default": "(current_timestamp)"
},
"creator_comment": {
"name": "creator_comment",
Expand All @@ -825,6 +882,14 @@
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'pending'"
}
},
"indexes": {},
Expand Down
Loading

0 comments on commit 22a8631

Please sign in to comment.