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
I am migrating from Orator. I have a table where I used to define __timestamps__ = ["created_at"] which seems to be unsupported by Masonite ORM. So I set __timestamps__ = False. The actual column on the database table has no default value, so I add a migration:
QueryException
syntax error at or near "None"
LINE 1: ... "stats" ALTER COLUMN "created_at" TYPE TIMESTAMP(None), ALT...
^
at .venv/lib/python3.9/site-packages/masoniteorm/connections/PostgresConnection.py:222 in query
218│ if "SELECT" in cursor.statusmessage:
219│ return cursor.fetchall()
220│ return {}
221│ except Exception as e:
→ 222│ raise QueryException(str(e)) from e
223│ finally:
224│ if self.get_transaction_level() <= 0:
225│ self.open = 0
226│ self.close_connection()
make: *** [migrate] Error 1
With a debugger I have been able to debug the Blueprint instance:
I got the migration to complete by manually setting _last_column.length = 6 in the debugger session.
Unfortunately I have not been able to find out where the length is actually set, now why it's set to None.
The text was updated successfully, but these errors were encountered:
I am migrating from Orator. I have a table where I used to define
__timestamps__ = ["created_at"]
which seems to be unsupported by Masonite ORM. So I set__timestamps__ = False
. The actual column on the database table has no default value, so I add a migration:The migration fails with the current error:
With a debugger I have been able to debug the
Blueprint
instance:I got the migration to complete by manually setting
_last_column.length = 6
in the debugger session.Unfortunately I have not been able to find out where the
length
is actually set, now why it's set toNone
.The text was updated successfully, but these errors were encountered: