Class: CreateTemplates

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

Instance Method Summary collapse

Instance Method Details

#changeObject



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

def change
  create_table :templates do |t|
    t.references :account, index: true, foreign_key: true
    t.string :template_key
    t.string :template_path
    t.string :template_print_driver             # use to identify if template only works with a particular driver, like the :zebra
    t.string :template_paper                    # use to identify if template only works with a particular paper, like the :label10x32
    t.text :template_content
    t.integer :lock_version, default: 1

    t.timestamps null: false
  end
end