Ticket #32832: django_AddField_error.txt

File django_AddField_error.txt, 6.1 KB (added by Omkar Deshpande, 3 years ago)

Full Error Traceback

Line 
1(venv) [root@1c97f2100531 almanac]# python manage.py migrate
2Operations to perform:
3 Apply all migrations: admin, auth, contenttypes, nucleus, sessions
4Running migrations:
5 Applying contenttypes.0001_initial... OK
6 Applying auth.0001_initial... OK
7 Applying admin.0001_initial... OK
8 Applying admin.0002_logentry_remove_auto_add... OK
9 Applying admin.0003_logentry_add_action_flag_choices... OK
10 Applying contenttypes.0002_remove_content_type_name... OK
11 Applying auth.0002_alter_permission_name_max_length... OK
12 Applying auth.0003_alter_user_email_max_length... OK
13 Applying auth.0004_alter_user_username_opts... OK
14 Applying auth.0005_alter_user_last_login_null... OK
15 Applying auth.0006_require_contenttypes_0002... OK
16 Applying auth.0007_alter_validators_add_error_messages... OK
17 Applying auth.0008_alter_user_username_max_length... OK
18 Applying auth.0009_alter_user_last_name_max_length... OK
19 Applying auth.0010_alter_group_name_max_length... OK
20 Applying auth.0011_update_proxy_permissions... OK
21 Applying auth.0012_alter_user_first_name_max_length... OK
22 Applying nucleus.0001_initial... OK
23 Applying nucleus.0002_auto_20210609_1553... OK
24 Applying nucleus.0003_nucleusdata_new_txt...Traceback (most recent call last):
25 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
26 return self.cursor.execute(sql, params)
27 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
28 return self.cursor.execute(query, args)
29 File "/root/almanac/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
30 res = self._query(query)
31 File "/root/almanac/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
32 db.query(q)
33 File "/root/almanac/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
34 _mysql.connection.query(self, query)
35MySQLdb._exceptions.OperationalError: (1101, "BLOB, TEXT, GEOMETRY or JSON column 'new_txt' can't have a default value")
36
37The above exception was the direct cause of the following exception:
38
39Traceback (most recent call last):
40 File "manage.py", line 21, in <module>
41 main()
42 File "manage.py", line 17, in main
43 execute_from_command_line(sys.argv)
44 File "/root/almanac/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
45 utility.execute()
46 File "/root/almanac/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
47 self.fetch_command(subcommand).run_from_argv(self.argv)
48 File "/root/almanac/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
49 self.execute(*args, **cmd_options)
50 File "/root/almanac/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
51 output = self.handle(*args, **options)
52 File "/root/almanac/venv/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
53 res = handle_func(*args, **kwargs)
54 File "/root/almanac/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 244, in handle
55 post_migrate_state = executor.migrate(
56 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 117, in migrate
57 state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
58 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
59 state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
60 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 227, in apply_migration
61 state = migration.apply(state, schema_editor)
62 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/migrations/migration.py", line 126, in apply
63 operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
64 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/migrations/operations/fields.py", line 104, in database_forwards
65 schema_editor.add_field(
66 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/mysql/schema.py", line 91, in add_field
67 super().add_field(model, field)
68 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 517, in add_field
69 self.execute(sql, params)
70 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 145, in execute
71 cursor.execute(sql, params)
72 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 98, in execute
73 return super().execute(sql, params)
74 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
75 return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
76 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
77 return executor(sql, params, many, context)
78 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
79 return self.cursor.execute(sql, params)
80 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
81 raise dj_exc_value.with_traceback(traceback) from exc_value
82 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
83 return self.cursor.execute(sql, params)
84 File "/root/almanac/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
85 return self.cursor.execute(query, args)
86 File "/root/almanac/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
87 res = self._query(query)
88 File "/root/almanac/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
89 db.query(q)
90 File "/root/almanac/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
91 _mysql.connection.query(self, query)
92django.db.utils.OperationalError: (1101, "BLOB, TEXT, GEOMETRY or JSON column 'new_txt' can't have a default value")
Back to Top