search for: addsystemsettings

Displaying 2 results from an estimated 2 matches for "addsystemsettings".

2006 Apr 04
2
loading data with migrations
Hello, I''m just taking a look at migrations, seems like a fantastic way to maintain the database. I am wonder if there is a way to maintain what I''ll call "reference data" along with the migrations. A lot of times in apps your have tables that have pretty static data, often used to generate select lists. Is there a way to insert the reference data into these tables
2005 Dec 29
3
migrations
...table if the model doesn''t exist and how can you create a model if the table doesn''t first exist. Can the migrations also be told to create a model for a new table? Because right now if I run this code it will fail to add the first row because the model does not exist yet. class AddSystemSettings < ActiveRecord::Migration def self.up create_table :system_settings do |t| t.column :name, :string t.column :label, :string t.column :value, :text t.column :type, :string t.column :position, :integer end SystemSetting.c...