(Not documented)
# File generators/annotations_migration/templates/migration_v1.rb, line 54 54: def self.down 55: drop_table :annotations 56: drop_table :annotation_versions 57: drop_table :annotation_attributes 58: drop_table :annotation_value_seeds 59: end
(Not documented)
# File generators/annotations_migration/templates/migration_v1.rb, line 2 2: def self.up 3: create_table :annotations, :force => true do |t| 4: t.string :source_type, :null => false 5: t.integer :source_id, :null => false 6: t.string :annotatable_type, :limit => 50, :null => false 7: t.integer :annotatable_id, :null => false 8: t.integer :attribute_id, :null => false 9: t.text :value, :limit => 20000, :null => false 10: t.string :value_type, :limit => 50, :null => false 11: t.integer :version, :null => false 12: t.integer :version_creator_id, :null => true 13: t.timestamps 14: end 15: 16: add_index :annotations, [ :source_type, :source_id ] 17: add_index :annotations, [ :annotatable_type, :annotatable_id ] 18: add_index :annotations, [ :attribute_id ] 19: 20: create_table :annotation_versions, :force => true do |t| 21: t.integer :annotation_id, :null => false 22: t.integer :version, :null => false 23: t.integer :version_creator_id, :null => true 24: t.string :source_type, :null => false 25: t.integer :source_id, :null => false 26: t.string :annotatable_type, :limit => 50, :null => false 27: t.integer :annotatable_id, :null => false 28: t.integer :attribute_id, :null => false 29: t.text :value, :limit => 20000, :null => false 30: t.string :value_type, :limit => 50, :null => false 31: t.timestamps 32: end 33: 34: add_index :annotation_versions, [ :annotation_id ] 35: 36: create_table :annotation_attributes, :force => true do |t| 37: t.string :name, :null => false 38: 39: t.timestamps 40: end 41: 42: add_index :annotation_attributes, [ :name ] 43: 44: create_table :annotation_value_seeds, :force => true do |t| 45: t.integer :attribute_id, :null => false 46: t.string :value, :null => false 47: 48: t.timestamps 49: end 50: 51: add_index :annotation_value_seeds, [ :attribute_id ] 52: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.