~/workspace$ pythn manage.py makemigrations customers bash: pythn: command not found ~/workspace$ python manage.py makemigrations customers Was the model customers.Package renamed to Service? [y/N] y Was invoice.package renamed to invoice.service (a ForeignKey)? [y/N] y Was invoice.package_amount renamed to invoice.service_amount (a DecimalField)? [y/N] Was serviceperiod.package renamed to serviceperiod.service (a ForeignKey)? [y/N] Was customer.package renamed to customer.service (a ForeignKey)? [y/N] It is impossible to add a non-nullable field 'service_amount' to invoice without specifying a default. This is because the database needs something to populate existing rows. Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit and manually define a default value in models.py. Select an option: Please select a valid option: Please select a valid option: Please select a valid option: 1 Please enter the default value as valid Python. The datetime and django.utils.timezone modules are available, so it is possible to provide e.g. timezone.now as a value. Type 'exit' to exit this prompt >>> '1000' It is impossible to add a non-nullable field 'service' to serviceperiod without specifying a default. This is because the database needs something to populate existing rows. Please select a fix: 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) 2) Quit and manually define a default value in models.py. Select an option: '1 month' Please select a valid option: 1 Please enter the default value as valid Python. The datetime and django.utils.timezone modules are available, so it is possible to provide e.g. timezone.now as a value. Type 'exit' to exit this prompt >>> '1 month' Migrations for 'billing': billing/migrations/0003_rename_package_invoice_service_and_more.py - Rename field package on invoice to service - Remove field package_amount from invoice - Remove field package from serviceperiod - Add field service_amount to invoice - Add field service to serviceperiod Migrations for 'customers': customers/migrations/0006_rename_package_service_alter_service_options_and_more.py - Rename model Package to Service - Change Meta options on service - Remove field package from customer - Add field service to customer ~/workspace$ python manage.py migrate Operations to perform: Apply all migrations: accounts, admin, auth, billing, contenttypes, customers, hr, network, notifications, payments, sessions, settings, tickets Running migrations: Applying billing.0003_rename_package_invoice_service_and_more...Traceback (most recent call last): File "/home/runner/workspace/manage.py", line 22, in main() File "/home/runner/workspace/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv self.execute(*args, **cmd_options) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute output = self.handle(*args, **options) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/core/management/base.py", line 107, in wrapper res = handle_func(*args, **kwargs) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 356, in handle post_migrate_state = executor.migrate( File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/migrations/executor.py", line 135, in migrate state = self._migrate_all_forwards( File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards state = self.apply_migration( File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/migrations/executor.py", line 252, in apply_migration state = migration.apply(state, schema_editor) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/migrations/migration.py", line 132, in apply operation.database_forwards( File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/migrations/operations/fields.py", line 108, in database_forwards schema_editor.add_field( File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", line 316, in add_field self._remake_table(model, create_field=field) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", line 145, in _remake_table self.effective_default(create_field) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 466, in effective_default return field.get_db_prep_save(self._effective_default(field), self.connection) File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 442, in _effective_default default = field.get_default() File "/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/django/db/models/fields/related.py", line 1135, in get_default if isinstance(field_default, self.remote_field.model): TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union