Only the sqlmigrate and sqlflush commands can be used when an app has migrations., sqlmigratesqlflush
samcao@samcao-Lenovo-IdeaPad-Y470:~/caodjango/caossh$ python manage.py sqlall getsshSystem check identified some issues:WARNINGS:?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DEBUG.CommandError: App 'getssh' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations.samcao@samcao-Lenovo-IdeaPad-Y470:~/caodjango/caossh$
samcao@samcao-Lenovo-IdeaPad-Y470:~/caodjango/caossh/getssh$ mv migrations/ migrations.back/
samcao@samcao-Lenovo-IdeaPad-Y470:~/caodjango/caossh/getssh$
Samcao @ samcao-Lenovo-IdeaPad-Y470 :~ /Caodjango/caossh $ python manage. py SQL getsshSystem check identified some issues: WARNINGS :?: (Listen 8.w001) The standalone TEMPLATE _ * settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. you must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DEBUG.BEGIN; create table 'getssh _ publisher '('id' integer AUTO_INCREMENT not null primary key, 'name' varchar (30) not null, 'address' varchar (50) not null, 'city' varchar (60) NOT NUL L, 'state _ province 'varchar (30) not null, 'country' varchar (50) not null, 'website' varchar (200) not null ); create table 'getssh _ author' ('id' integer AUTO_INCREMENT not null primary key, 'First _ name' varchar (30) not null, 'last _ name' varchar (40) not null, 'email 'varchar (254) not null); create table 'getssh _ book_authors '('id' integer AUTO_INCREMENT not null primary key, 'book _ id' integer NOT NUL L, 'author _ id' integer not null, UNIQUE ('book _ id', 'author _ id ')); alter table 'getssh _ book_authors 'add constraint 'author _ id_refs_id_20f26b36' foreign key ('author _ id') REFERENCES 'getssh _ author '('id '); create table 'getssh _ Book' ('id' integer AUTO_INCREMENT not null primary key, 'title' varchar (100) not null, 'her her _ id' integer not null, 'publication _ date' date not null); alter table 'getssh _ Book 'add constraint' her _ id_refs_id_99765d4d 'eign KEY ('her her _ id') REFERENCES 'getssh _ her' ('id '); alter table 'getssh _ book_authors 'add constraint 'book _ id_refs_id_2cfb1c02' foreign key ('book _ id') REFERENCES 'getssh _ Book' ('id'); COMMIT; samcao @ samcao-Lenovo-IdeaPad-Y470 :~ /Caodjango/caossh $View Code
The prompt is Only the sqlmigrate and sqlflush commands can be used when an app has migrations.
Delete the migrations folder under the apps directory, or rename it.