Please quote when replying. It is very difficult to follow the
conversation if you don't.
Simão Freitas wrote:
I didn't know about Rspec and Machinist. I'll try them thanks for the
I'm using composite_primary_keys, I didn't explain myself well lol.
I don't use migrations.
Well, start now! There are many advantages and virtually no
disadvantages to using migrations.
OH! You're right! There are tables missing from the schema.rb file.
That would be a serious problem. The test framework uses rake
db:schema:load to create the database.
Don't know the reason because when I ran the tests (and db creation
previously) separately there was no error. Anyway, there's an error in
every table that was missing, related to the BIT datatype. Something
# Could not dump table "addresses" because of following StandardError
# Unknown type 'bit(1)' for column 'is_primary'
So, maybe that datatype isn't supported? I think I'll just use TINYINTs
Use migrations and you won't have to worry, since Rails handles the
By the way, I don't have a very large knowledge about rails, i'm still
figuring it out, but here's another question:
Can I use migrations with physical constraints in the database?
You mean such as foreign key constraints?
they become "nulled" and inconsistent after a migration or any change in
What gives you that idea?
All that will be lost right?
No! Use the foreigner plugin like I suggested.
Thanks a lot for your help!