Skip to content

Commit

Permalink
Changed type of field from array to string type
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitri committed Jul 19, 2024
1 parent 3f797e3 commit 6b90653
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@


def upgrade():
op.add_column('records', sa.Column('publisher_project_source', sa.ARRAY(sa.Unicode), index=True))
op.add_column('items', sa.Column('publisher_project_source', sa.ARRAY(sa.Unicode), index=True))
op.add_column('records', sa.Column('publisher_project_source', sa.Unicode, index=True))
op.add_column('items', sa.Column('publisher_project_source', sa.Unicode, index=True))


def downgrade():
op.drop_column('records', 'publisher_project_source')
op.drop_column('items', 'publisher_project_source')
op.drop_column('items', 'publisher_project_source')
2 changes: 1 addition & 1 deletion model/postgres/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Item(Base, Core):

id = Column(Integer, primary_key=True)
source = Column(Unicode, nullable=False, index=True)
publisher_project_source = Column(ARRAY(Unicode, dimensions=1), index=True)
publisher_project_source = Column(Unicode, index=True)
content_type = Column(Unicode)
contributors = Column(JSONB)
modified = Column(DateTime)
Expand Down
2 changes: 1 addition & 1 deletion model/postgres/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Record(Base, Core):
)
cluster_status = Column(Boolean, default=False, nullable=False, index=True)
source = Column(Unicode, index=True) # dc:source, Non-Repeating
publisher_project_source = Column(ARRAY(Unicode, dimensions=1), index=True) # dc:publisherProjectSource, Non-Repeating
publisher_project_source = Column(Unicode, index=True) # dc:publisherProjectSource, Non-Repeating
source_id = Column(Unicode, index=True) # dc:identifier, Non-Repeating
title = Column(Unicode) # dc:title, Non-Repeating
alternative = Column(ARRAY(Unicode, dimensions=1)) # dc:alternative, Repeating
Expand Down

0 comments on commit 6b90653

Please sign in to comment.