Passing rubocop
This commit is contained in:
parent
6cd1de21dd
commit
cb6e5ce29f
4 changed files with 3 additions and 7 deletions
|
|
@ -11,7 +11,6 @@ class CreateVisits < ActiveRecord::Migration
|
|||
else
|
||||
t.integer :visitor_id
|
||||
end
|
||||
|
||||
|
||||
# the rest are recommended but optional
|
||||
# simply remove the columns you don't want
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class CreateAhoyEvents < ActiveRecord::Migration
|
|||
else
|
||||
t.integer :visit_id
|
||||
end
|
||||
|
||||
|
||||
# user
|
||||
t.integer :user_id
|
||||
# add t.string :user_type if polymorphic
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class SplitTicketPriceInPriceAndCurrency < ActiveRecord::Migration
|
|||
|
||||
def change
|
||||
adapter_type = connection.adapter_name.downcase.to_sym
|
||||
|
||||
|
||||
case adapter_type
|
||||
when :postgresql
|
||||
add_monetize :tickets, :price
|
||||
|
|
@ -15,7 +15,6 @@ class SplitTicketPriceInPriceAndCurrency < ActiveRecord::Migration
|
|||
add_money :tickets, :price
|
||||
end
|
||||
|
||||
|
||||
TempTicket.all.each do |ticket|
|
||||
# Replace currency symbol with ISO Code
|
||||
if ticket.ticket_price
|
||||
|
|
|
|||
|
|
@ -3,14 +3,12 @@
|
|||
class ChangeVisitIdTypeOfAhoyEventsToInteger < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
adapter_type = connection.adapter_name.downcase.to_sym
|
||||
|
||||
|
||||
case adapter_type
|
||||
when :postgresql
|
||||
change_column :ahoy_events, :visit_id, :integer, limit: nil, using: "('x' || translate(left(visit_id::text, 18), '-', ''))::bit(32)::int"
|
||||
else
|
||||
change_column :ahoy_events, :visit_id, :integer, limit: nil
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue