added topic_edit.jinja2
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 07fa8fad6cc3
|
||||
Revises:
|
||||
Create Date: 2022-05-01 10:48:25.244455
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '07fa8fad6cc3'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('tags',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('topic', sa.Unicode(length=25), nullable=True),
|
||||
sa.Column('tag', sa.Unicode(length=25), nullable=True),
|
||||
sa.Column('tag_name', sa.Unicode(length=25), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_tags'))
|
||||
)
|
||||
op.create_index('topic_index', 'tags', ['topic', 'tag'], unique=False)
|
||||
op.create_table('topics',
|
||||
sa.Column('topic', sa.Unicode(length=25), nullable=False),
|
||||
sa.Column('topic_name', sa.Unicode(length=25), nullable=False),
|
||||
sa.PrimaryKeyConstraint('topic', name=op.f('pk_topics'))
|
||||
)
|
||||
op.create_table('users',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('name', sa.Unicode(length=255), nullable=False),
|
||||
sa.Column('password', sa.Unicode(length=255), nullable=False),
|
||||
sa.Column('last_logged', sa.DateTime(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_users')),
|
||||
sa.UniqueConstraint('name', name=op.f('uq_users_name'))
|
||||
)
|
||||
op.create_table('entries',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('title', sa.Unicode(length=255), nullable=False),
|
||||
sa.Column('body', sa.UnicodeText(), nullable=True),
|
||||
sa.Column('body_html', sa.UnicodeText(), nullable=True),
|
||||
sa.Column('created', sa.DateTime(), nullable=True),
|
||||
sa.Column('edited', sa.DateTime(), nullable=True),
|
||||
sa.Column('topic_id', sa.Unicode(length=25), nullable=False),
|
||||
sa.ForeignKeyConstraint(['topic_id'], ['topics.topic'], name=op.f('fk_entries_topic_id_topics')),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_entries')),
|
||||
sa.UniqueConstraint('title', name=op.f('uq_entries_title'))
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('entries')
|
||||
op.drop_table('users')
|
||||
op.drop_table('topics')
|
||||
op.drop_index('topic_index', table_name='tags')
|
||||
op.drop_table('tags')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,26 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 1a99bede8b76
|
||||
Revises: 1c62fb741d2f
|
||||
Create Date: 2022-05-01 16:50:53.674187
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1a99bede8b76'
|
||||
down_revision = '1c62fb741d2f'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('title_url', sa.Unicode(length=255), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('entries', 'title_url')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,30 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 5ad5927ad64d
|
||||
Revises: 1a99bede8b76
|
||||
Create Date: 2022-05-05 15:49:10.984878
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '5ad5927ad64d'
|
||||
down_revision = '1a99bede8b76'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('author', sa.UnicodeText(), nullable=True))
|
||||
op.drop_column('entries', 'title_url')
|
||||
op.drop_column('entries', 'body_html')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('body_html', sa.TEXT(), nullable=True))
|
||||
op.add_column('entries', sa.Column('title_url', sa.VARCHAR(length=255), nullable=True))
|
||||
op.drop_column('entries', 'author')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,8 +1,8 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 1c62fb741d2f
|
||||
Revises: 07fa8fad6cc3
|
||||
Create Date: 2022-05-01 11:16:29.476581
|
||||
Revision ID: a35fa375a82f
|
||||
Revises:
|
||||
Create Date: 2022-05-10 08:28:42.146580
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
@@ -10,17 +10,17 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1c62fb741d2f'
|
||||
down_revision = '07fa8fad6cc3'
|
||||
revision = 'a35fa375a82f'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('tag', sa.Unicode(length=25), nullable=True))
|
||||
op.add_column('topics', sa.Column('topic_quote', sa.Unicode(length=255), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('entries', 'tag')
|
||||
op.drop_column('topics', 'topic_quote')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user