Skip to content

Commit 19970f8

Browse files
committed
chore: format with prettier
1 parent 48b7694 commit 19970f8

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

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

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@
5252
"name": "contents_project_id_projects_id_fk",
5353
"tableFrom": "contents",
5454
"tableTo": "projects",
55-
"columnsFrom": [
56-
"project_id"
57-
],
58-
"columnsTo": [
59-
"id"
60-
],
55+
"columnsFrom": ["project_id"],
56+
"columnsTo": ["id"],
6157
"onDelete": "cascade",
6258
"onUpdate": "no action"
6359
}
@@ -112,12 +108,8 @@
112108
"name": "projects_user_id_users_id_fk",
113109
"tableFrom": "projects",
114110
"tableTo": "users",
115-
"columnsFrom": [
116-
"user_id"
117-
],
118-
"columnsTo": [
119-
"id"
120-
],
111+
"columnsFrom": ["user_id"],
112+
"columnsTo": ["id"],
121113
"onDelete": "cascade",
122114
"onUpdate": "no action"
123115
}
@@ -165,9 +157,7 @@
165157
"users_email_unique": {
166158
"name": "users_email_unique",
167159
"nullsNotDistinct": false,
168-
"columns": [
169-
"email"
170-
]
160+
"columns": ["email"]
171161
}
172162
},
173163
"policies": {},
@@ -186,4 +176,4 @@
186176
"schemas": {},
187177
"tables": {}
188178
}
189-
}
179+
}

apps/server/drizzle/meta/_journal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"breakpoints": true
1818
}
1919
]
20-
}
20+
}

apps/server/src/database/schema.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@ export const usersTable = pgTable('users', {
99

1010
export const projectsTable = pgTable('projects', {
1111
id: uuid('id').defaultRandom().primaryKey(),
12-
userId: uuid('user_id').notNull().references(() => usersTable.id, { onDelete: 'cascade' }),
12+
userId: uuid('user_id')
13+
.notNull()
14+
.references(() => usersTable.id, { onDelete: 'cascade' }),
1315
name: varchar('name', { length: 255 }),
1416
createdAt: timestamp('created_at').defaultNow().notNull(),
1517
updatedAt: timestamp('updated_at').defaultNow().notNull(),
1618
});
1719

1820
export const contentsTable = pgTable('contents', {
1921
id: uuid('id').defaultRandom().primaryKey(),
20-
projectId: uuid('project_id').notNull().references(() => projectsTable.id, { onDelete: 'cascade' }),
22+
projectId: uuid('project_id')
23+
.notNull()
24+
.references(() => projectsTable.id, { onDelete: 'cascade' }),
2125
name: varchar('name', { length: 255 }),
2226
url: varchar('url', { length: 255 }),
2327
start: real('start').notNull(),
2428
length: real('length').notNull(),
2529
});
26-
27-

apps/server/src/routes/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import authRoutes from './auth';
2-
import userRoutes from './user';
32
import projectRoutes from './project';
3+
import userRoutes from './user';
44
import express from 'express';
55

66
const router = express.Router();

0 commit comments

Comments
 (0)