Sha256: 91d84a8334c9c5131757166af3768e9627279d01842445934b2ad35fe3a3cf5b

Contents?: true

Size: 624 Bytes

Versions: 2

Compression:

Stored size: 624 Bytes

Contents

class CreatePanels < ActiveRecord::Migration
  def self.up
    create_table :panels do |t|
      t.column :name, :string, :limit => 64, :null => false
      t.column :panel_key, :string, :limit => 36, :null => false
      t.column :picture, :string, :limit => 36, :null => false
      t.column :furniture_id, :integer, :null => false, :on_update => :cascade, :on_delete => :restrict
      t.column :network_id, :integer, :null => true, :on_update => :cascade, :on_delete => :set_null
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end
  end

  def self.down
    drop_table :panels
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
advertnet-1.0.0 db/migrate/006_create_panels.rb
advertnet-1.0.1 db/migrate/006_create_panels.rb