Skip to content

Commit

Permalink
fix: mysql specific change
Browse files Browse the repository at this point in the history
  • Loading branch information
qasimgulzar authored Nov 4, 2024
1 parent 89c42f7 commit ef37204
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from django.conf import settings
from django.db import connection

def run_before_migrate(apps, migrations):
def run_before_migrate(migrations):
if connection.vendor == 'mysql':
# MySQL: utf8_bin collation
return [migrations.RunSQL('ALTER TABLE learning_sequences_learningcontext MODIFY context_key VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin;',reverse_sql=migrations.RunSQL.noop,),
Expand Down Expand Up @@ -117,4 +117,4 @@ class Migration(migrations.Migration):
name='coursesection',
index_together={('learning_context', 'ordering')},
),
]+run_before_migrate(migrations)
] + run_before_migrate(migrations)

0 comments on commit ef37204

Please sign in to comment.