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

django migration already exists #138

Open
devops724 opened this issue Nov 19, 2022 · 0 comments
Open

django migration already exists #138

devops724 opened this issue Nov 19, 2022 · 0 comments

Comments

@devops724
Copy link

$sudo isql
$CREATE DATABASE 'api.fdb' page_size 8192 user 'SYSDBA' password '1234' default character set utf8 collation UNICODE_CI ;
exit;

$python manage.py migrate
Operations to perform:
Apply all migrations: admin, api, auth, contenttypes, sessions, sites
Running migrations:
Applying contenttypes.0001_initial...Traceback (most recent call last):
File "/home/user/server/manage.py", line 33, in
main()
File "/home/user/server/manage.py", line 29, in main
execute_from_command_line(sys.argv)
File "/home/user/env/lib/python3.9/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/home/user/env/lib/python3.9/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/user/env/lib/python3.9/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/user/env/lib/python3.9/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/home/user/env/lib/python3.9/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/home/user/env/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 232, in handle
post_migrate_state = executor.migrate(
File "/home/user/env/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/user/env/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/user/env/lib/python3.9/site-packages/django/db/migrations/executor.py", line 246, in apply_migration
self.record_migration(migration)
File "/home/user/env/lib/python3.9/site-packages/django/db/migrations/executor.py", line 261, in record_migration
self.recorder.record_applied(migration.app_label, migration.name)
File "/home/user/env/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 82, in record_applied
self.ensure_schema()
File "/home/user/env/lib/python3.9/site-packages/django/db/migrations/recorder.py", line 67, in ensure_schema
editor.create_model(self.Migration)
File "/home/user/env/lib/python3.9/site-packages/django/db/backends/firebird/schema.py", line 760, in create_model
self.execute(sql, params or None)
File "/home/user/env/lib/python3.9/site-packages/django/db/backends/firebird/schema.py", line 876, in execute
raise e
File "/home/user/env/lib/python3.9/site-packages/django/db/backends/firebird/schema.py", line 874, in execute
cur.execute(str(sql), params)
File "/home/user/env/lib/python3.9/site-packages/fdb/fbcore.py", line 3695, in execute
self._ps._execute(parameters)
File "/home/user/env/lib/python3.9/site-packages/fdb/fbcore.py", line 3388, in _execute
raise exception_from_status(DatabaseError, self._isc_status,
fdb.fbcore.DatabaseError: ('Error while executing SQL statement:\n- SQLCODE: -607\n- unsuccessful metadata update\n- CREATE TABLE DJANGO_MIGRATIONS failed\n- Table DJANGO_MIGRATIONS already exists', -607, 335544351)

Django==2.2.28
django-firebird==2.2

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

1 participant