How to Reset Migrations

0


The project is still in the development environment and you want to perform a full clean up. You don’t mind throwing the whole database away.

Drop Database

psql
drop database "packs4jobs";

Remove migrations files

find . -path "*/migrations/*.py" -not -name "__init__.py" -not -name "case_insensitive.py" -delete
find . -path "*/migrations/*.pyc"  -delete

Create Database

create database packs4jobs;
grant all privileges on database packs4jobs to packs4jobs;
python manage.py migrate core case_insensitive

Post a Comment

0 Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

This site uses cookies from Google to deliver its services and analyze traffic. Your IP address and user-agent are shared with Google along with performance and security metrics to ensure quality of service, generate usage statistics, and to detect and address abuse. More Info
Ok, Go it!