Skip to content

Commit

Permalink
added some debug printing
Browse files Browse the repository at this point in the history
  • Loading branch information
saylorsd committed Dec 12, 2024
1 parent a2ec5f5 commit ecbc77f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/housing_data/management/commands/connect_housing_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def handle(self, *args, **options):
""".lstrip())

with connection.cursor() as cursor:
print(f"""CREATE SCHEMA IF NOT EXISTS maps""")
print(f"""DROP MATERIALIZED VIEW IF EXISTS {view_name}""")
print(f"""CREATE MATERIALIZED VIEW {view_name} AS {view_query}""")
print(f"""GRANT SELECT ON {view_name} TO {os.environ.get('MAPS_DB_USER')};""")

cursor.execute(f"""CREATE SCHEMA IF NOT EXISTS maps""")
cursor.execute(f"""DROP MATERIALIZED VIEW IF EXISTS {view_name}""")
cursor.execute(f"""CREATE MATERIALIZED VIEW {view_name} AS {view_query}""")
Expand Down

0 comments on commit ecbc77f

Please sign in to comment.