mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
A lot of database changes and add options to change notification level
This commit is contained in:
30
migrations/versions/099037c4aa06_.py
Normal file
30
migrations/versions/099037c4aa06_.py
Normal file
@ -0,0 +1,30 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 099037c4aa06
|
||||
Revises: 66253783654f
|
||||
Create Date: 2020-04-27 09:17:15.039728
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '099037c4aa06'
|
||||
down_revision = '66253783654f'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('users', sa.Column('last_seen', sa.DateTime(), nullable=True))
|
||||
op.add_column('users', sa.Column('setting_site_job_status_notifications', sa.String(length=16), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('users', 'setting_site_job_status_notifications')
|
||||
op.drop_column('users', 'last_seen')
|
||||
# ### end Alembic commands ###
|
36
migrations/versions/49a42c69e523_.py
Normal file
36
migrations/versions/49a42c69e523_.py
Normal file
@ -0,0 +1,36 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 49a42c69e523
|
||||
Revises: 099037c4aa06
|
||||
Create Date: 2020-04-27 11:18:32.999099
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '49a42c69e523'
|
||||
down_revision = '099037c4aa06'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('users', sa.Column('member_since', sa.DateTime(), nullable=True))
|
||||
op.add_column('users', sa.Column('setting_job_status_mail_notifications', sa.String(length=16), nullable=True))
|
||||
op.add_column('users', sa.Column('setting_job_status_site_notifications', sa.String(length=16), nullable=True))
|
||||
op.drop_column('users', 'setting_site_job_status_notifications')
|
||||
op.drop_column('users', 'registration_date')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('users', sa.Column('registration_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
|
||||
op.add_column('users', sa.Column('setting_site_job_status_notifications', sa.VARCHAR(length=16), autoincrement=False, nullable=True))
|
||||
op.drop_column('users', 'setting_job_status_site_notifications')
|
||||
op.drop_column('users', 'setting_job_status_mail_notifications')
|
||||
op.drop_column('users', 'member_since')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user