Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize the system #533

Open
shizoooo opened this issue Feb 26, 2025 · 1 comment
Open

Customize the system #533

shizoooo opened this issue Feb 26, 2025 · 1 comment

Comments

@shizoooo
Copy link

Hi, im trying to delete some of its tables from db and when i start the project i got tables error. How do you prefer fix this error, like deleting the related folders of the tables, or something like that, anyone has solution ?

@horilla-opensource
Copy link
Owner

Hello @shizoooo ,

If you've manually deleted tables from the database, Django's migration system might be out of sync with the current database schema.

To fix this, try the following steps:

  1. Reset Migrations: Delete the migration files (excluding __init__.py) from the related app's migrations folder.

  2. Clear Migration History: Run this command to remove migration history from the database:

    python manage.py migrate app_name zero
  3. Recreate Migrations:

    python manage.py makemigrations
  4. Apply Migrations:

    python manage.py migrate

If you're still facing issues, share the exact error message, and we'd be happy to help!

Best Regards
Team Horilla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants