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
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
class Task
include DataMapper::Resource
property :id, Serial
has n, :things
end
I run automigrate and this table syncs fine. I change it to the following:
class Task
include DataMapper::Resource
property :id, Serial
has n, :things, :required => false
end
And autoupgrade fails on a hard to parse error.
(in /home/me/xyz)
DataMapper::Sweatshop::Unique - ParseTree could not be loaded, anonymous uniques will not be allowed
rake aborted!
Cannot add a NOT NULL column with default value NULL
(See full trace by running task with --trace)
AFAIK I am not changing the column to "NOT NULL". In fact I am changing it to allow null values, not remove them.
Other migration engines (such as South) handle this change pretty gracefully.
The text was updated successfully, but these errors were encountered:
Also fails when trying to add a new has n, :things, :required => false. The new id table is marked as INTEGER NOT NULL despite the required => false. Note that adding a new belongs_to :thing, :required => false works fine. Database I'm currently using is sqlite3.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a model like the following
I run automigrate and this table syncs fine. I change it to the following:
And autoupgrade fails on a hard to parse error.
AFAIK I am not changing the column to "NOT NULL". In fact I am changing it to allow null values, not remove them.
Other migration engines (such as South) handle this change pretty gracefully.
The text was updated successfully, but these errors were encountered: