Sha256: 1bd4f3ea1ff09bf2f4256c9c1cd36469970dd3cec287c9f788c89f3f6f39faac
Contents?: true
Size: 680 Bytes
Versions: 3
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true class CreateRateTable < ActiveRecord::Migration[5.0] def change create_table :rating_rates do |t| t.decimal :value, default: 0, precision: 25, scale: 16 t.references :author, index: true, null: false, polymorphic: true t.references :resource, index: true, null: false, polymorphic: true t.references :scopeable, index: true, null: true, polymorphic: true t.timestamps null: false end change_column :rating_rates, :author_type, :string, limit: 10 change_column :rating_rates, :resource_type, :string, limit: 10 change_column :rating_rates, :scopeable_type, :string, limit: 10 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rating-0.11.0 | spec/support/db/migrate/create_rates_table.rb |
rating-0.10.0 | spec/support/db/migrate/create_rates_table.rb |
rating-0.9.0 | spec/support/db/migrate/create_rates_table.rb |