Skip to content

Commit

Permalink
Fixed mapfolder visibility migration for PostgreSQL. (#1230)
Browse files Browse the repository at this point in the history
* Fixed mapfolder migration for PostgreSQL.

* Fixed mapfolder migration for PostgreSQL (1).
  • Loading branch information
TheMaximum committed Nov 6, 2022
1 parent 63b299d commit cc1b12a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def upgrade(migrator: SchemaMigrator):
try:
query = RawQuery(MapFolder, """SELECT * FROM `mapfolder` WHERE public = 1""")
query = RawQuery(MapFolder, """SELECT * FROM mapfolder WHERE public = True""")
public_folders = query.execute()

migrate(
Expand All @@ -21,7 +21,7 @@ def upgrade(migrator: SchemaMigrator):

def downgrade(migrator: SchemaMigrator):
try:
query = RawQuery(MapFolder, """SELECT * FROM `mapfolder` WHERE visibility = 'public'""")
query = RawQuery(MapFolder, """SELECT * FROM mapfolder WHERE visibility = 'public'""")
public_folders = query.execute()

migrate(
Expand Down

0 comments on commit cc1b12a

Please sign in to comment.