-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: admin & SCHEMA: annotation, assertion add datetime
- Loading branch information
Showing
4 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
alembic/versions/0dc9eae4c472_notes_disposition_assertion_annotation_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
"""notes-disposition-assertion-annotation-date | ||
Revision ID: 0dc9eae4c472 | ||
Revises: 60df15f0646f | ||
Create Date: 2024-05-29 10:56:15.139121 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
import geoalchemy2 | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '0dc9eae4c472' | ||
down_revision = '60df15f0646f' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('alternative_name', | ||
sa.Column('id', sa.Integer(), nullable=False), | ||
sa.Column('name', sa.String(length=500), nullable=True), | ||
sa.Column('lang', sa.String(length=8), nullable=True), | ||
sa.Column('named_area_id', sa.Integer(), nullable=False), | ||
sa.Column('created', sa.DateTime(), nullable=True), | ||
sa.Column('updated', sa.DateTime(), nullable=True), | ||
sa.ForeignKeyConstraint(['named_area_id'], ['named_area.id'], ), | ||
sa.PrimaryKeyConstraint('id', 'named_area_id') | ||
) | ||
op.drop_table('addon_geoname') | ||
op.add_column('multimedia_object_annotation', sa.Column('datetime', sa.DateTime(), nullable=True)) | ||
op.add_column('record_assertion', sa.Column('datetime', sa.DateTime(), nullable=True)) | ||
op.add_column('unit', sa.Column('disposition', sa.String(length=500), nullable=True)) | ||
op.add_column('unit', sa.Column('notes', sa.Text(), nullable=True)) | ||
op.add_column('unit_annotation', sa.Column('datetime', sa.DateTime(), nullable=True)) | ||
op.add_column('unit_assertion', sa.Column('datetime', sa.DateTime(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('unit_assertion', 'datetime') | ||
op.drop_column('unit_annotation', 'datetime') | ||
op.drop_column('unit', 'notes') | ||
op.drop_column('unit', 'disposition') | ||
op.drop_column('record_assertion', 'datetime') | ||
op.drop_column('multimedia_object_annotation', 'datetime') | ||
op.create_table('addon_geoname', | ||
sa.Column('geonameid', sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column('name', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('asciiname', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('alternatenames', sa.TEXT(), autoincrement=False, nullable=True), | ||
sa.Column('latitude', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('longitude', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('feature_class', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('feature_code', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('country_code', sa.VARCHAR(length=2), autoincrement=False, nullable=True), | ||
sa.Column('cc2', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('admin1_code', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('admin2_code', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('admin3_code', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('admin4_code', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('population', sa.INTEGER(), autoincrement=False, nullable=True), | ||
sa.Column('elevation', sa.INTEGER(), autoincrement=False, nullable=True), | ||
sa.Column('dem', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('timezone', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.Column('modification_date', sa.VARCHAR(length=500), autoincrement=False, nullable=True), | ||
sa.PrimaryKeyConstraint('geonameid', name='addon_geoname_pkey') | ||
) | ||
op.drop_table('alternative_name') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters