Skip to content

Commit

Permalink
Rename auth_user table to users_user
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysyngsun committed Feb 5, 2025
1 parent 914a11a commit 90a1fe5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
25 changes: 25 additions & 0 deletions users/migrations/0002_rename_user_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.18 on 2025-02-05 22:00

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("users", "0001_initial"),
]

operations = [
migrations.AlterModelOptions(
name="user",
options={"verbose_name": "user", "verbose_name_plural": "users"},
),
migrations.AlterModelTable(
name="user",
table=None,
),
migrations.RunSQL(
sql="CREATE VIEW auth_user AS SELECT * FROM users_user;",
reverse_sql="DROP VIEW auth_user;",
elidable=True,
),
]
3 changes: 0 additions & 3 deletions users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@

class User(AbstractUser):
"""Custom model for users"""

class Meta:
db_table = "auth_user"

0 comments on commit 90a1fe5

Please sign in to comment.