You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In migrations when creating a schema if we add default value to string field to be empty string ('') and run the migrations, that field becomes NULL in the table.
Example of migration:
class CreateSomeTable(Migration):
def up(self):
with self.schema.create('some_table') as table:
table.increments('id')
table.string('another_field', 10).default('')
....
Desktop (please complete the following information):
OS: Linux
Version Ubuntu 21.10
What database are you using?
Type: [MySQL]
Version [14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper]
Masonite ORM [2.4.2]
The text was updated successfully, but these errors were encountered:
In migrations when creating a schema if we add default value to string field to be empty string (
''
) and run the migrations, that field becomes NULL in the table.Example of migration:
Desktop (please complete the following information):
What database are you using?
The text was updated successfully, but these errors were encountered: