Add timestamps to workspace
This commit is contained in:
30
alembic/versions/a2b499a1dd62_workspace_timestamps.py
Normal file
30
alembic/versions/a2b499a1dd62_workspace_timestamps.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""workspace timestamps
|
||||
|
||||
Revision ID: a2b499a1dd62
|
||||
Revises: f549c7cee17c
|
||||
Create Date: 2018-08-17 10:43:13.165829
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a2b499a1dd62'
|
||||
down_revision = 'f549c7cee17c'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('workspaces', sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False))
|
||||
op.add_column('workspaces', sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('workspaces', 'time_updated')
|
||||
op.drop_column('workspaces', 'time_created')
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user