Skip to content

Commit

Permalink
[#64] update export/restore script
Browse files Browse the repository at this point in the history
  • Loading branch information
mjstealey committed Apr 29, 2024
1 parent 8188a2e commit 571f5c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions server/swagger_server/backup/utils/db_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def dump_announcements_data():
"""
FabricAnnouncements(BaseMixin, TimestampMixin, TrackingMixin, db.Model):
- announcement_type = db.Column(db.Enum(EnumAnnouncementTypes),default=EnumAnnouncementTypes.facility)
- background_image_url = db.Column(db.String(), nullable=True)
- button = db.Column(db.String())
- content = db.Column(db.String(), nullable=False)
- created = db.Column(db.DateTime(timezone=True), nullable=False, default=datetime.now(timezone.utc))
Expand All @@ -107,6 +108,7 @@ def dump_announcements_data():
for a in fab_announcements:
data = {
'announcement_type': a.announcement_type.name,
'background_image_url': a.background_image_url,
'button': a.button,
'content': a.content,
'created': normalize_date_to_utc(date_str=str(a.created), return_type='str'),
Expand Down
7 changes: 3 additions & 4 deletions server/swagger_server/backup/utils/db_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@
public | user_subject_identifiers | table | postgres <-- user_subject_identifiers-v<VERSION>.json
(30 rows)
Changes from v1.6.1 --> v1.6.2
Changes from v1.6.2 --> v1.7.0
- table: people - added: receive_promotional_email
Changes from v1.6.2 --> v1.7
- TODO: table: projects - added: communities, funding_source
- TODO: table: projects - added: communities, projects_funding
- TODO: table: projects_communities
- TODO: table: projects_funding_directorates
- TODO: table: projects_funding_source
- TODO: table: projects_funding
"""

import json
Expand Down

0 comments on commit 571f5c4

Please sign in to comment.