File: 20150407031737_set_up_testing_db.rb

package info (click to toggle)
ruby-jsonb-accessor 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: ruby: 371; makefile: 10; sh: 5
file content (24 lines) | stat: -rw-r--r-- 529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

class SetUpTestingDb < ActiveRecord::Migration[5.0]
  def change
    create_table :products do |t|
      t.jsonb :options
      t.jsonb :data

      t.string :string_type
      t.integer :integer_type
      t.integer :product_category_id
      t.boolean :boolean_type
      t.float :float_type
      t.time :time_type
      t.date :date_type
      t.datetime :datetime_type
      t.decimal :decimal_type
    end

    create_table :product_categories do |t|
      t.jsonb :options
    end
  end
end