Skip to content

Commit 0dd69db

Browse files
committed
drizzle migrations
1 parent 387082f commit 0dd69db

5 files changed

Lines changed: 91 additions & 235 deletions

File tree

apps/cf-server/drizzle/0001_loving_wendigo.sql renamed to apps/cf-server/drizzle/0000_greedy_lady_deathstrike.sql

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
CREATE TABLE `contactus` (
2+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3+
`name` text NOT NULL,
4+
`email` text NOT NULL,
5+
`subject` text NOT NULL,
6+
`description` text NOT NULL,
7+
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
8+
);
9+
--> statement-breakpoint
110
CREATE TABLE `userProfiles` (
211
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
312
`uuid` text NOT NULL,
@@ -17,5 +26,4 @@ CREATE TABLE `userProfiles` (
1726
`reviews` text
1827
);
1928
--> statement-breakpoint
20-
CREATE UNIQUE INDEX `userProfiles_uuid_unique` ON `userProfiles` (`uuid`);--> statement-breakpoint
21-
DROP TABLE `user_profile`;
29+
CREATE UNIQUE INDEX `userProfiles_uuid_unique` ON `userProfiles` (`uuid`);

apps/cf-server/drizzle/0000_special_lorna_dane.sql

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/cf-server/drizzle/meta/0000_snapshot.json

Lines changed: 79 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "6",
33
"dialect": "sqlite",
4-
"id": "20f1098a-563c-40d3-b536-35629a298696",
4+
"id": "85c305e4-d47e-4a49-8fbf-cb7785391f16",
55
"prevId": "00000000-0000-0000-0000-000000000000",
66
"tables": {
77
"contactus": {
@@ -57,8 +57,8 @@
5757
"uniqueConstraints": {},
5858
"checkConstraints": {}
5959
},
60-
"user_profile": {
61-
"name": "user_profile",
60+
"userProfiles": {
61+
"name": "userProfiles",
6262
"columns": {
6363
"id": {
6464
"name": "id",
@@ -67,57 +67,122 @@
6767
"notNull": true,
6868
"autoincrement": true
6969
},
70-
"email": {
71-
"name": "email",
70+
"uuid": {
71+
"name": "uuid",
7272
"type": "text",
7373
"primaryKey": false,
7474
"notNull": true,
7575
"autoincrement": false
7676
},
77-
"name": {
78-
"name": "name",
77+
"created_at": {
78+
"name": "created_at",
7979
"type": "text",
8080
"primaryKey": false,
8181
"notNull": true,
82-
"autoincrement": false
82+
"autoincrement": false,
83+
"default": "CURRENT_TIMESTAMP"
8384
},
84-
"role": {
85-
"name": "role",
85+
"full_name": {
86+
"name": "full_name",
8687
"type": "text",
8788
"primaryKey": false,
8889
"notNull": true,
8990
"autoincrement": false
9091
},
92+
"avatar_url": {
93+
"name": "avatar_url",
94+
"type": "text",
95+
"primaryKey": false,
96+
"notNull": false,
97+
"autoincrement": false
98+
},
9199
"phone": {
92100
"name": "phone",
93101
"type": "text",
94102
"primaryKey": false,
95-
"notNull": true,
103+
"notNull": false,
96104
"autoincrement": false
97105
},
98106
"address": {
99107
"name": "address",
100108
"type": "text",
101109
"primaryKey": false,
102-
"notNull": true,
110+
"notNull": false,
103111
"autoincrement": false
104112
},
105113
"city": {
106114
"name": "city",
107115
"type": "text",
108116
"primaryKey": false,
109-
"notNull": true,
117+
"notNull": false,
110118
"autoincrement": false
111119
},
112120
"state": {
113121
"name": "state",
114122
"type": "text",
115123
"primaryKey": false,
124+
"notNull": false,
125+
"autoincrement": false
126+
},
127+
"pincode": {
128+
"name": "pincode",
129+
"type": "text",
130+
"primaryKey": false,
131+
"notNull": false,
132+
"autoincrement": false
133+
},
134+
"updated_at": {
135+
"name": "updated_at",
136+
"type": "text",
137+
"primaryKey": false,
138+
"notNull": false,
139+
"autoincrement": false
140+
},
141+
"email_notifications": {
142+
"name": "email_notifications",
143+
"type": "text",
144+
"primaryKey": false,
145+
"notNull": false,
146+
"autoincrement": false
147+
},
148+
"bio": {
149+
"name": "bio",
150+
"type": "text",
151+
"primaryKey": false,
152+
"notNull": false,
153+
"autoincrement": false
154+
},
155+
"user_login_info": {
156+
"name": "user_login_info",
157+
"type": "text",
158+
"primaryKey": false,
159+
"notNull": false,
160+
"autoincrement": false
161+
},
162+
"email": {
163+
"name": "email",
164+
"type": "text",
165+
"primaryKey": false,
116166
"notNull": true,
117167
"autoincrement": false
168+
},
169+
"reviews": {
170+
"name": "reviews",
171+
"type": "text",
172+
"primaryKey": false,
173+
"notNull": false,
174+
"autoincrement": false
175+
}
176+
},
177+
"indexes": {
178+
"userProfiles_uuid_unique": {
179+
"name": "userProfiles_uuid_unique",
180+
"columns": [
181+
"uuid"
182+
],
183+
"isUnique": true
118184
}
119185
},
120-
"indexes": {},
121186
"foreignKeys": {},
122187
"compositePrimaryKeys": {},
123188
"uniqueConstraints": {},

apps/cf-server/drizzle/meta/0001_snapshot.json

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)