Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: modules #374

Merged
merged 22 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules
next-env.d.ts
.husky
bun.lockb
*.toml
*.toml
drizzle
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ words:
- typecheck
- Uploadthing
- Upstash
- healthcheck
15 changes: 15 additions & 0 deletions drizzle/0001_minor_warlock.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS "modules" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"user_id" text NOT NULL,
"name" text NOT NULL,
"description" text NOT NULL,
"code" text NOT NULL,
"icon" text DEFAULT 'default' NOT NULL,
"color" text DEFAULT 'default' NOT NULL,
"archived" boolean DEFAULT false NOT NULL,
"credits" integer DEFAULT 0 NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"modified_at" timestamp DEFAULT now() NOT NULL,
"last_visited" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "modules_id_unique" UNIQUE("id")
);
1 change: 1 addition & 0 deletions drizzle/0002_complex_sally_floyd.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "modules" ALTER COLUMN "description" DROP NOT NULL;
20 changes: 11 additions & 9 deletions drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"id": "b304d26a-1927-40c9-9067-57935d6d9ab3",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "6",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.early_access": {
Expand Down Expand Up @@ -60,17 +58,21 @@
"uniqueConstraints": {
"early_access_email_unique": {
"name": "early_access_email_unique",
"nullsNotDistinct": false,
"columns": ["email"]
"columns": [
"email"
],
"nullsNotDistinct": false
}
}
}
},
"enums": {},
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
"tables": {},
"columns": {}
},
"id": "b304d26a-1927-40c9-9067-57935d6d9ab3",
"prevId": "00000000-0000-0000-0000-000000000000"
}
177 changes: 177 additions & 0 deletions drizzle/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"id": "e2f7138b-3bc5-4e5c-8e9f-df04364cddcb",
"prevId": "b304d26a-1927-40c9-9067-57935d6d9ab3",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.early_access": {
"name": "early_access",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"reason": {
"name": "reason",
"type": "text",
"primaryKey": false,
"notNull": true
},
"approved": {
"name": "approved",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp (3)",
"primaryKey": false,
"notNull": false,
"default": "now()"
},
"invitation_sent_at": {
"name": "invitation_sent_at",
"type": "timestamp (3)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"early_access_email_unique": {
"name": "early_access_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
}
},
"public.modules": {
"name": "modules",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"code": {
"name": "code",
"type": "text",
"primaryKey": false,
"notNull": true
},
"icon": {
"name": "icon",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'default'"
},
"color": {
"name": "color",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'default'"
},
"archived": {
"name": "archived",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"credits": {
"name": "credits",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"modified_at": {
"name": "modified_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"last_visited": {
"name": "last_visited",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"modules_id_unique": {
"name": "modules_id_unique",
"nullsNotDistinct": false,
"columns": [
"id"
]
}
}
}
},
"enums": {},
"schemas": {},
"sequences": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
Loading
Loading