Sha256: 1453d8d83d082735a6aa98c3c98f21dbd496247f5b9a413f4ca341bd7386fdb8

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

class RailsDataInit < ActiveRecord::Migration[5.0]

  def change

    create_table :data_lists do |t|
      t.string :title
      t.string :comment, limit: 4096
      t.string :type
      t.string :parameters, limit: 1024
      t.string :columns, limit: 1024
      t.string :data_table
      t.string :export_excel
      t.string :export_pdf
      t.timestamps
    end

    create_table :table_lists do |t|
      t.references :data_list
      t.string :headers, limit: 4096
      t.string :footers, limit: 4096
      t.integer :table_items_count, default: 0
      t.string :parameters, limit: 1024
      t.string :timestamp
      t.boolean :done
      t.boolean :published
      t.timestamps
    end

    create_table :table_items do |t|
      t.references :table_list
      t.string :fields, limit: 4096
      t.timestamps
    end

    create_table :record_lists do |t|
      t.references :data_list
      t.string :columns, limit: 4096
      t.string :parameters, limit: 1024
      t.boolean :done
      t.timestamps
    end

    create_table :record_items do |t|
      t.references :record_list
      t.string :fields, limit: 10240
      t.timestamps
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_data-1.0.2 db/migrate/20150618053929_rails_data_init.rb