davebridges / mousedb

Django Based Database System for Experimental Subjects
http://davebridges.github.com/mousedb
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

error on manage.py migrate #49

Open ze-gois opened 10 years ago

ze-gois commented 10 years ago

Hello! Thanks for sharing your work, it make us possible to advance towards not yet implemented features. But I have few troubles on running the mousedb properly. I'm using Ubuntu, I followed the instructions, but when I reached to section 2.5 @ 6th command line ="python manage.py migrate" it displays the following error:


cerebro@cerebro:~/Ze/mousedb$ python manage.py migrate

Running migrations for data:

! You might be able to recover with: = DROP TABLE data_experiment CASCADE; [] = DROP TABLE data_experiment_researchers CASCADE; [] = DROP TABLE data_assay CASCADE; [] = DROP TABLE data_measurement CASCADE; [] = DROP TABLE data_researcher CASCADE; [] = DROP TABLE data_study CASCADE; [] = DROP TABLE data_study_strain CASCADE; [] = DROP TABLE data_treatment CASCADE; [] = DROP TABLE data_treatment_animals CASCADE; [] = DROP TABLE data_treatment_implantation CASCADE; [] = DROP TABLE data_treatment_pharmaceutical CASCADE; [] = DROP TABLE data_treatment_researchers CASCADE; [] = DROP TABLE data_vendor CASCADE; [] = DROP TABLE data_diet CASCADE; [] = DROP TABLE data_environment CASCADE; [] = DROP TABLE data_environment_contact CASCADE; [] = DROP TABLE data_implantation CASCADE; [] = DROP TABLE data_implantation_surgeon CASCADE; [] = DROP TABLE data_pharmaceutical CASCADE; [] = DROP TABLE data_transplantation CASCADE; [] = DROP TABLE data_transplantation_donor CASCADE; [] = DROP TABLE data_transplantation_surgeon CASCADE; [] = DROP TABLE data_cohort CASCADE; [] = DROP TABLE data_cohort_animals CASCADE; [] = DROP TABLE data_cohort_studies CASCADE; [] = DROP TABLE data_cohort_treatment_groups CASCADE; []

! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS (one that supports DDL transactions) ! NOTE: The error which caused the migration to fail is further up. Error in migration: data:0002_initial DatabaseError: (1050, "Table 'data_experiment' already exists")


I have tried to delete the whole database and redo the process but nothing changed. The 0002_initial tries to remake the tables made by the 0001_initial, is there a way to skip this migrate step?

Thanks in advance, José Henrique Instituto do Cérebro - UFRN

davebridges commented 10 years ago

Jose,

Try running

python manage.py migrate 0001 --fake

for whatever numbers are causing the problems.

On Wed, Jan 8, 2014 at 8:43 AM, Zé Henrique notifications@github.comwrote:

Hello! Thanks for sharing your work, it make us possible to advance towards not yet implemented features. But I have few troubles on running the mousedb properly. I'm using Ubuntu, I followed the instructions, but when I reached to section 2.5 @ 6th command line ="python manage.py migrate" it displays the following error:

cerebro@cerebro:~/Ze/mousedb$ python manage.py migrate Running migrations for data:

-

Migrating forwards to 0005_initial.

data:0001_initial data:0002_initial FATAL ERROR - The following SQL query failed: CREATE TABLE data_experiment (id integer AUTO_INCREMENT NOT NULL PRIMARY KEY, datedate NOT NULL, notes longtext NOT NULL, time time NULL, experimentID varchar(50) NOT NULL, feeding_state varchar(20) NOT NULL, fasting_time integer NULL, injection varchar(20) NOT NULL, concentration varchar(20) NOT NULL, study_id integer NULL) The error was: (1050, "Table 'data_experiment' already exists") ! Error found during real run of migration! Aborting.

! Since you have a database that does not support running ! schema-altering statements in transactions, we have had ! to leave it in an interim state between migrations.

! You might be able to recover with: = DROP TABLE data_experimentCASCADE; [] = DROP TABLE data_experiment_researchers CASCADE; [] = DROP TABLE data_assay CASCADE; [] = DROP TABLE data_measurement CASCADE; [] = DROP TABLE data_researcher CASCADE; [] = DROP TABLE data_study CASCADE; [] = DROP TABLE data_study_strain CASCADE; [] = DROP TABLE data_treatment CASCADE; [] = DROP TABLE data_treatment_animals CASCADE; [] = DROP TABLE data_treatment_implantation CASCADE; [] = DROP TABLE data_treatment_pharmaceutical CASCADE; [] = DROP TABLE data_treatment_researchers CASCADE; [] = DROP TABLE data_vendor CASCADE; [] = DROP TABLE data_diet CASCADE; [] = DROP TABLE data_environment CASCADE; [] = DROP TABLE data_environment_contact CASCADE; [] = DROP TABLE data_implantation CASCADE; [] = DROP TABLE data_implantation_surgeon CASCADE; [] = DROP TABLE data_pharmaceutical CASCADE; [] = DROP TABLE data_transplantation CASCADE; [] = DROP TABLE data_transplantation_donor CASCADE; [] = DROP TABLE data_transplantation_surgeon CASCADE; [] = DROP TABLE data_cohort CASCADE; [] = DROP TABLE data_cohort_animals CASCADE; [] = DROP TABLE data_cohort_studies CASCADE; [] = DROP TABLE data_cohort_treatment_groups CASCADE; []

! The South developers regret this has happened, and would ! like to gently persuade you to consider a slightly ! easier-to-deal-with DBMS (one that supports DDL transactions) ! NOTE: The error which caused the migration to fail is further up. Error in migration: data:0002_initial DatabaseError: (1050, "Table 'data_experiment' already exists")

I have tried to delete the whole database and redo the process but nothing changed. The 0002_initial tries to remake the tables made by the 0001_initial, is there a way to skip this migrate step?

Thanks in advance, José Henrique Instituto do Cérebro - UFRN

— Reply to this email directly or view it on GitHubhttps://github.com/davebridges/mousedb/issues/49 .