mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
Fix migrations for MySQL
This commit is contained in:
parent
61ac9c558c
commit
8ceb9ccc0c
5 changed files with 14 additions and 6 deletions
|
@ -187,3 +187,11 @@ OPTIONNAL_APPS = OPTIONNAL_APPS_RE2O + (...,...,)
|
|||
```
|
||||
|
||||
Don't forget to run migrations afterwards.
|
||||
|
||||
## MR 433 : upgrade django-ldapdb to 1.3.0
|
||||
|
||||
If you use MySQL, please run
|
||||
|
||||
```
|
||||
SET GLOBAL SQL_MODE=ANSI_QUOTES;
|
||||
```
|
||||
|
|
|
@ -109,7 +109,7 @@ install_database() {
|
|||
mysql_command="CREATE DATABASE $db_name collate='utf8_general_ci';
|
||||
CREATE USER '$username'@'localhost' IDENTIFIED BY '$password';
|
||||
GRANT ALL PRIVILEGES ON $db_name.* TO '$username'@'localhost';
|
||||
FLUSH PRIVILEGES;"
|
||||
FLUSH PRIVILEGES;SET GLOBAL SQL_MODE=ANSI_QUOTES;"
|
||||
|
||||
if [ "$local_setup" == 1 ]; then
|
||||
echo "Setting up local MySQL server ..."
|
||||
|
|
|
@ -54,9 +54,9 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
],
|
||||
database_operations=[
|
||||
migrations.RunSQL('ALTER TABLE "users_ldapuser" ADD COLUMN "displayName" varchar(200) NULL;'),
|
||||
migrations.RunSQL('ALTER TABLE "users_ldapuser" ADD COLUMN "sambaNTPassword" varchar(200) NULL;'),
|
||||
migrations.RunSQL('ALTER TABLE "users_ldapuser" ADD COLUMN "userPassword" varchar(200) NULL;'),
|
||||
migrations.RunSQL('ALTER TABLE users_ldapuser ADD COLUMN "displayName" varchar(200) NULL;'),
|
||||
migrations.RunSQL('ALTER TABLE users_ldapuser ADD COLUMN "sambaNTPassword" varchar(200) NULL;'),
|
||||
migrations.RunSQL('ALTER TABLE users_ldapuser ADD COLUMN "userPassword" varchar(200) NULL;'),
|
||||
]
|
||||
),
|
||||
migrations.AddField(
|
||||
|
|
|
@ -45,7 +45,7 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
],
|
||||
database_operations=[
|
||||
migrations.RunSQL('ALTER TABLE "users_ldapuser" ADD COLUMN "loginShell" varchar(200) NULL;')
|
||||
migrations.RunSQL('ALTER TABLE users_ldapuser ADD COLUMN "loginShell" varchar(200) NULL;')
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
|
|
|
@ -22,7 +22,7 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
],
|
||||
database_operations=[
|
||||
migrations.RunSQL('ALTER TABLE "users_ldapuser" ADD COLUMN "shadowExpire" varchar(200) NULL;'),
|
||||
migrations.RunSQL('ALTER TABLE users_ldapuser ADD COLUMN "shadowExpire" varchar(200) NULL;'),
|
||||
]
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue