From c6826734c336ffad45ad7ab1a8f3f95f4f52448e Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 19 Jul 2018 16:20:07 -0400 Subject: [PATCH] Fixed typo --- README.md | 2 +- import.py | 2 +- schema.sql | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e70f1be..a42f1d7 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,4 @@ youtube-dl -v --print-traffic --restrict-filename --write-description --write-in * Run `import.py` ### Schema: -![schema](https://user-images.githubusercontent.com/7120851/42966031-cb83f216-8b69-11e8-9c9e-a8bcefdc7456.png) +![schema](https://user-images.githubusercontent.com/7120851/42967825-72bc88fe-8b6f-11e8-81a7-f8e7e17077d8.png) diff --git a/import.py b/import.py index 9e0f905..18e9030 100644 --- a/import.py +++ b/import.py @@ -148,7 +148,7 @@ def create_format(cursor, **kwargs): def create_chapter(cursor, video_id, start_time, end_time, title): - cursor.execute('INSERT INTO chatper (start_time, end_time, title, video_id) VALUES (%s,%s,%s,%s) ' + cursor.execute('INSERT INTO chapter (start_time, end_time, title, video_id) VALUES (%s,%s,%s,%s) ' 'ON CONFLICT DO NOTHING', (start_time, end_time, title, video_id)) print("Created chapter for " + video_id) diff --git a/schema.sql b/schema.sql index cf3eaa4..20a1ccd 100644 --- a/schema.sql +++ b/schema.sql @@ -156,21 +156,21 @@ create table subtitles ) ; -create table chatper +create table chapter ( id serial not null - constraint chatper_pkey + constraint chapter_pkey primary key, start_time integer not null, end_time integer not null, title text, video_id text not null - constraint chatper_video_id_fk + constraint chapter_video_id_fk references video ) ; -create unique index chatper_id_uindex - on chatper (id) +create unique index chapter_id_uindex + on chapter (id) ;