-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from diogosilva30/try-fix-migrations
Fix migration issues with django native "squashmigrations" command
- Loading branch information
Showing
1 changed file
with
161 additions
and
0 deletions.
There are no files selected for viewing
161 changes: 161 additions & 0 deletions
161
django_keycloak/migrations/0001_redo_migrations_0001to0005.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# Generated by Django 3.2.9 on 2022-10-19 11:16 | ||
|
||
from django.db import migrations, models | ||
import django_keycloak.managers | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
replaces = [ | ||
("django_keycloak", "0001_initial"), | ||
("django_keycloak", "0002_auto_20210209_1503"), | ||
("django_keycloak", "0003_auto_20210406_1426"), | ||
("django_keycloak", "0004_keycloakuserautoid"), | ||
("django_keycloak", "0005_auto_20211231_1702"), | ||
] | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
("auth", "0011_update_proxy_permissions"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="KeycloakUser", | ||
fields=[ | ||
("password", models.CharField(max_length=128, verbose_name="password")), | ||
( | ||
"last_login", | ||
models.DateTimeField( | ||
blank=True, null=True, verbose_name="last login" | ||
), | ||
), | ||
( | ||
"username", | ||
models.CharField( | ||
max_length=20, unique=True, verbose_name="username" | ||
), | ||
), | ||
( | ||
"id", | ||
models.UUIDField( | ||
primary_key=True, | ||
serialize=False, | ||
unique=True, | ||
verbose_name="keycloak_id", | ||
), | ||
), | ||
("is_staff", models.BooleanField(default=False)), | ||
("is_superuser", models.BooleanField(default=False)), | ||
("is_active", models.BooleanField(default=True)), | ||
("date_joined", models.DateTimeField(auto_now_add=True)), | ||
( | ||
"groups", | ||
models.ManyToManyField( | ||
blank=True, | ||
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.", | ||
related_name="user_set", | ||
related_query_name="user", | ||
to="auth.Group", | ||
verbose_name="groups", | ||
), | ||
), | ||
( | ||
"user_permissions", | ||
models.ManyToManyField( | ||
blank=True, | ||
help_text="Specific permissions for this user.", | ||
related_name="user_set", | ||
related_query_name="user", | ||
to="auth.Permission", | ||
verbose_name="user permissions", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
"swappable": "AUTH_USER_MODEL", | ||
"verbose_name": "User", | ||
"verbose_name_plural": "Users", | ||
}, | ||
managers=[ | ||
("objects", django_keycloak.managers.KeycloakUserManager()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="KeycloakUserAutoId", | ||
fields=[ | ||
("password", models.CharField(max_length=128, verbose_name="password")), | ||
( | ||
"last_login", | ||
models.DateTimeField( | ||
blank=True, null=True, verbose_name="last login" | ||
), | ||
), | ||
( | ||
"username", | ||
models.CharField( | ||
max_length=20, unique=True, verbose_name="username" | ||
), | ||
), | ||
("is_staff", models.BooleanField(default=False)), | ||
("is_superuser", models.BooleanField(default=False)), | ||
("is_active", models.BooleanField(default=True)), | ||
("date_joined", models.DateTimeField(auto_now_add=True)), | ||
("id", models.AutoField(primary_key=True, serialize=False)), | ||
( | ||
"keycloak_id", | ||
models.UUIDField(unique=True, verbose_name="keycloak_id"), | ||
), | ||
( | ||
"groups", | ||
models.ManyToManyField( | ||
blank=True, | ||
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.", | ||
related_name="user_set", | ||
related_query_name="user", | ||
to="auth.Group", | ||
verbose_name="groups", | ||
), | ||
), | ||
( | ||
"user_permissions", | ||
models.ManyToManyField( | ||
blank=True, | ||
help_text="Specific permissions for this user.", | ||
related_name="user_set", | ||
related_query_name="user", | ||
to="auth.Permission", | ||
verbose_name="user permissions", | ||
), | ||
), | ||
( | ||
"email", | ||
models.EmailField( | ||
blank=True, max_length=254, verbose_name="email address" | ||
), | ||
), | ||
( | ||
"first_name", | ||
models.CharField( | ||
blank=True, max_length=150, verbose_name="first name" | ||
), | ||
), | ||
( | ||
"last_name", | ||
models.CharField( | ||
blank=True, max_length=150, verbose_name="last name" | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "User", | ||
"verbose_name_plural": "Users", | ||
"swappable": "AUTH_USER_MODEL", | ||
}, | ||
managers=[ | ||
("objects", django_keycloak.managers.KeycloakUserManagerAutoId()), | ||
], | ||
), | ||
] |