On 29 Jun 2009, at 13:14, Martin Gamsjaeger wrote:

>> I git cloned your Merb, diff'd the merb_datamapper and made the non-
>> Action ORM changes to my local merb_datamapper and my test sqlite3  
>> app
>> now works. I _think_ that's down to the changes to the automigration
>> using DataMapper.auto_migrate! directly.
>>
>> With the test app working, I went back to my main development app and
>> discovered that I had :nullable => false in my migrations against
>> the :id keys, thus:
>>
>> :id, Serial, :nullable => false
>>
>> Now, I'm not sure if that is needed or not - obviously you don't want
>> null ids, so presumably they're not NULL by default?
>
> Yes, they are not null by default, :id, Serial should be enough

I've reviewed this further and :id, Serial isn't actually enough with  
0.10RC1 - that's because with Postgres (and maybe others) it doesn't  
actually create a Serial column if you're using rake db:migrate, as  
apposed to Datamapper.automigrate!

> It's definitely a good idea to have a look at the tickets!

It is! Here's one created regarding this very matter - 
http://datamapper.lighthouseapp.com/projects/20609/tickets/938-datamapper-010-does-not-make-serial-properties-serial-in-postgresql-using-dm-migrations

With that done, I was able to make more progress with a 'standard'  
merb_datamapper. I'm not 100% there yet, however, so I'll let you know  
what other changes I had to make, if any.

Andy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to