Skip to content

Commit d35b51c

Browse files
committed
update
Signed-off-by: Kirill Mokevnin <[email protected]>
1 parent cdc38f7 commit d35b51c

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

db/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const courses = sqliteTable('courses', {
2727

2828
export const courseLessons = sqliteTable('course_lessons', {
2929
id: integer('id').primaryKey(),
30-
name: text('name'),
30+
name: text('name').notNull(),
3131
courseId: integer('courseId').references(() => courses.id).notNull(),
3232
body: text('body').notNull(),
3333
createdAt: text('created_at')

drizzle/0000_striped_mephisto.sql renamed to drizzle/0000_ordinary_wolfpack.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CREATE TABLE `course_lessons` (
22
`id` integer PRIMARY KEY NOT NULL,
3-
`name` text,
3+
`name` text NOT NULL,
44
`courseId` integer NOT NULL,
55
`body` text NOT NULL,
66
`created_at` text DEFAULT (unixepoch()) NOT NULL,

drizzle/meta/0000_snapshot.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "6",
33
"dialect": "sqlite",
4-
"id": "7ceb7a0a-5b91-4343-b3ae-a30bb904d647",
4+
"id": "91bd3d6b-c3d6-444a-ab90-6e466fe473aa",
55
"prevId": "00000000-0000-0000-0000-000000000000",
66
"tables": {
77
"course_lessons": {
@@ -18,7 +18,7 @@
1818
"name": "name",
1919
"type": "text",
2020
"primaryKey": false,
21-
"notNull": false,
21+
"notNull": true,
2222
"autoincrement": false
2323
},
2424
"courseId": {

drizzle/meta/_journal.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
{
66
"idx": 0,
77
"version": "6",
8-
"when": 1724697947550,
9-
"tag": "0000_striped_mephisto",
8+
"when": 1724698374872,
9+
"tag": "0000_ordinary_wolfpack",
1010
"breakpoints": true
1111
}
1212
]

routes/courses/lessons.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { and, asc, eq } from 'drizzle-orm'
33
import * as schemas from './../../db/schema.js'
44
import { schema } from '../../schema.js'
55
import { getPagingOptions } from '../../lib/utils.js'
6-
import Course from '../../models/Course.js'
76
import Lesson from '../../models/Course/Lesson.js'
87

98
/**

0 commit comments

Comments
 (0)