Class: CreatePrintables

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/printer/templates/printable.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/printer/templates/printable.rb', line 2

def change
  create_table :printables do |t|
    t.references :account, null: false, index: true
    t.references :printer, index: true
    t.references :printable, polymorphic: true, index: true
    t.string :template
    t.boolean :preferred

    t.timestamps
  end
end