add indentation in sql queries
This commit is contained in:
parent
5aa544cc9c
commit
90c93528ec
|
@ -2,7 +2,7 @@ from logging import Logger
|
||||||
import psycopg2
|
import psycopg2
|
||||||
from psycopg2.extensions import connection
|
from psycopg2.extensions import connection
|
||||||
from psycopg2.extras import DictCursor, DictRow
|
from psycopg2.extras import DictCursor, DictRow
|
||||||
from yoyo import read_migrations, get_backend
|
from yoyo import get_backend, read_migrations
|
||||||
from exceptions import DisplayableException
|
from exceptions import DisplayableException
|
||||||
from rss import FeedItem
|
from rss import FeedItem
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
from yoyo import step
|
from yoyo import step
|
||||||
|
|
||||||
steps = [
|
steps = [
|
||||||
step('CREATE TABLE users (id SERIAL PRIMARY KEY, telegram_id INTEGER NOT NULL UNIQUE)'),
|
step(
|
||||||
step('CREATE TABLE feeds (id SERIAL PRIMARY KEY, url TEXT NOT NULL UNIQUE)'),
|
'CREATE TABLE users ('
|
||||||
|
' id SERIAL PRIMARY KEY,'
|
||||||
|
' telegram_id INTEGER NOT NULL UNIQUE'
|
||||||
|
')'
|
||||||
|
),
|
||||||
|
step('CREATE TABLE feeds ('
|
||||||
|
' id SERIAL PRIMARY KEY,'
|
||||||
|
' url TEXT NOT NULL UNIQUE'
|
||||||
|
')'
|
||||||
|
),
|
||||||
step(
|
step(
|
||||||
'CREATE TABLE subscriptions ('
|
'CREATE TABLE subscriptions ('
|
||||||
' user_id INTEGER REFERENCES users,'
|
' user_id INTEGER REFERENCES users,'
|
||||||
|
|
Loading…
Reference in a new issue