class Support
Public Instance Methods
change()
click to toggle source
# File lib/netfira/web_connect/db_schema/20140514_support.rb, line 4 def change create_table :_tables do |t| t.string :name, limit: 50, index: true t.string :origin_key, limit: 20 t.boolean :file t.boolean :writable t.boolean :sendable end create_table :_shops do |t| t.string :name t.index :name, unique: true end Netfira::WebConnect::Models::Shop.create id: 0 create_table :_settings do |t| t.references :shop, index: true t.string :key t.binary :value, limit: 0x10000 t.string :content_type end create_table :_custom_fields do |t| t.references :shop t.references :table t.references :record t.string :key t.binary :value, limit: 0x10000 t.index [:shop_id, :table_id, :record_id], name: 'index_custom_fields' t.index [:shop_id, :table_id, :record_id, :key], name: 'index_custom_fields_with_keys', unique: true end create_table :_sessions do |t| t.references :shop, index: true t.string :token, limit: 40, index: true t.datetime :expires_at end end