I was underscoring the necessity of migrations to manage the the database.

For example lets say before you ignored and deleted the sqlite files
you had two developers both tracking your git repo.

With those database files checked in, as you each pushed and pulled,
you would either corrupt the database, or you would begin to see each
others database entries.  If dev A changed the schema and pushed, when
dev B pulled, he would get the updated schema. Everything would appear
to be honky dory.

But now that you've ignored the sqlite data files, both checkouts will
be blisfully unaware of schema and data changes by the other developer
unless you adopt some other way of maintaining the schema.  Rails
provides this management with the migrations.

Remember too that you have more than just one schema to worry about,
eventually you will need a production database, and you'll need a test
database if you are writing tests like a good little developer.

If you have your schema entirely managed by migrations keeping all
three environments up to date becomes trivial.

rake db:migrate   # Defaults to RAILS_ENV=development
rake db:migrate RAILS_ENV=test
rake db:migrate RAILS_ENV=production

If you are interested in talking more about the Rails details email me
directly, or seek out a Rails list.

Good luck with your project.

On Wed, Jul 21, 2010 at 6:39 PM, Lille <lille.pengu...@gmail.com> wrote:
> Donovan,
>
> Thank you very much -- that makes it right.
>
> I'm not in strict agreement with your statement...
>
>> That means you need to be using migrations to keep your schemas updated.
>
> I branched and performed the following rails actions:
>
> rake db:drop
> <modified migration file(s)>
> rake db:migrate
> git add .
> git commit ...
> git checkout master
> git merge ...
>
> ...and I found the modifications to the migration file properly
> transferred. Maybe you were underscoring the necessity of migrations
> to retain the database...
>
> Thanks,
>
> Lille
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To post to this group, send email to git-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/git-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to