[opensuse-ruby] Packaging schema.rb for rails applications
Hi, I now face one design issue we have in SLMS. We mark schema.rb as non-config and handle failed write during db:migration. I think that it is not good approach and schema.rb should contain correct state of database. How do you handle such situation? mark schema.rb as config or symlink somewhere in /var/lib? Ignore it? Josef -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
Dne 20.7.2012 15:57, Josef Reidinger napsal(a):
Hi, I now face one design issue we have in SLMS. We mark schema.rb as non-config and handle failed write during db:migration. I think that it is not good approach and schema.rb should contain correct state of database.
Well, schema.rb is part of slms-core package, so if it is packaged correctly it should contain the latest DB state. I.e. the file should contain the correct content even _before_ running migrations. I think there is no need to update it, the file from RPM should be up to date already.
How do you handle such situation? mark schema.rb as config or symlink somewhere in /var/lib? Ignore it?
In webyast it's handled the same way as in SLMS. -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
On 07/20/2012 05:45 PM, Ladislav Slezak wrote:
Dne 20.7.2012 15:57, Josef Reidinger napsal(a):
Hi, I now face one design issue we have in SLMS. We mark schema.rb as non-config and handle failed write during db:migration. I think that it is not good approach and schema.rb should contain correct state of database.
Well, schema.rb is part of slms-core package, so if it is packaged correctly it should contain the latest DB state. I.e. the file should contain the correct content even _before_ running migrations.
I think there is no need to update it, the file from RPM should be up to date already.
You need to make sure that you actually create that file (packaged in RPM) with the very same Rails that the application runs on. Some Rails versions just generate that file differently. Maybe we should first check why that file gets regenerated even if it's actually not needed. Bye Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org
participants (3)
-
Josef Reidinger
-
Ladislav Slezak
-
Lukas Ocilka