Add Rails release to ActiveRecord::Migration
This commit is contained in:
parent
44a198c7bc
commit
74531f90c7
108 changed files with 108 additions and 108 deletions
|
@ -1,4 +1,4 @@
|
||||||
class CreateUsers < ActiveRecord::Migration
|
class CreateUsers < ActiveRecord::Migration[4.2]
|
||||||
USER_ADMIN = 'admin'
|
USER_ADMIN = 'admin'
|
||||||
USER_TEST = 'test'
|
USER_TEST = 'test'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateGroups < ActiveRecord::Migration
|
class CreateGroups < ActiveRecord::Migration[4.2]
|
||||||
GROUP_ADMIN = 'Administrators'
|
GROUP_ADMIN = 'Administrators'
|
||||||
GROUP_ORDER = 'Sample Order Group'
|
GROUP_ORDER = 'Sample Order Group'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateSuppliers < ActiveRecord::Migration
|
class CreateSuppliers < ActiveRecord::Migration[4.2]
|
||||||
SUPPLIER_SAMPLE = 'Sample Supplier'
|
SUPPLIER_SAMPLE = 'Sample Supplier'
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateArticleMeta < ActiveRecord::Migration
|
class CreateArticleMeta < ActiveRecord::Migration[4.2]
|
||||||
CATEGORY_SAMPLE = 'Sample Category'
|
CATEGORY_SAMPLE = 'Sample Category'
|
||||||
TAX_STANDARD = 'Standard'
|
TAX_STANDARD = 'Standard'
|
||||||
TAX_REDUCED = 'Reduced'
|
TAX_REDUCED = 'Reduced'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateFinancialTransactions < ActiveRecord::Migration
|
class CreateFinancialTransactions < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
# Create Financial Transactions
|
# Create Financial Transactions
|
||||||
create_table :financial_transactions do |t|
|
create_table :financial_transactions do |t|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateArticles < ActiveRecord::Migration
|
class CreateArticles < ActiveRecord::Migration[4.2]
|
||||||
SAMPLE_ARTICLE_NAMES = ['banana', 'kiwi', 'strawberry']
|
SAMPLE_ARTICLE_NAMES = ['banana', 'kiwi', 'strawberry']
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateArticlePrices < ActiveRecord::Migration
|
class CreateArticlePrices < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :article_prices do |t|
|
create_table :article_prices do |t|
|
||||||
t.column :article_id, :int, :null => false
|
t.column :article_id, :int, :null => false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateOrders < ActiveRecord::Migration
|
class CreateOrders < ActiveRecord::Migration[4.2]
|
||||||
ORDER_TEST = 'Test Order'
|
ORDER_TEST = 'Test Order'
|
||||||
GROUP_ORDER = 'Orders'
|
GROUP_ORDER = 'Orders'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateOrderResults < ActiveRecord::Migration
|
class CreateOrderResults < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :group_order_results do |t|
|
create_table :group_order_results do |t|
|
||||||
t.column :order_id, :int, :null => false
|
t.column :order_id, :int, :null => false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class UserPasswordReset < ActiveRecord::Migration
|
class UserPasswordReset < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
add_column :users, :reset_password_token, :string
|
add_column :users, :reset_password_token, :string
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateComments < ActiveRecord::Migration
|
class CreateComments < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :comments, :force => true do |t|
|
create_table :comments, :force => true do |t|
|
||||||
t.column :title, :string, :limit => 50, :default => ""
|
t.column :title, :string, :limit => 50, :default => ""
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateOrderClearing < ActiveRecord::Migration
|
class CreateOrderClearing < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
add_column :orders, :invoice_amount, :decimal, :precision => 8, :scale => 2, :null => false, :default => 0
|
add_column :orders, :invoice_amount, :decimal, :precision => 8, :scale => 2, :null => false, :default => 0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddMessaging < ActiveRecord::Migration
|
class AddMessaging < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
# Table that holds the messages:
|
# Table that holds the messages:
|
||||||
create_table :messages do |t|
|
create_table :messages do |t|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateTasks < ActiveRecord::Migration
|
class CreateTasks < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :tasks do |t|
|
create_table :tasks do |t|
|
||||||
t.column :name, :string, :null => false
|
t.column :name, :string, :null => false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeResultQuantities < ActiveRecord::Migration
|
class ChangeResultQuantities < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
change_column :group_order_article_results, :quantity, :decimal, :precision => 6, :scale => 3
|
change_column :group_order_article_results, :quantity, :decimal, :precision => 6, :scale => 3
|
||||||
change_column :order_article_results, :units_to_order, :decimal, :precision => 6, :scale => 3, :null => false
|
change_column :order_article_results, :units_to_order, :decimal, :precision => 6, :scale => 3, :null => false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddSharedListsConnection < ActiveRecord::Migration
|
class AddSharedListsConnection < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :suppliers, :shared_supplier_id, :integer
|
add_column :suppliers, :shared_supplier_id, :integer
|
||||||
add_column :articles, :manufacturer , :string
|
add_column :articles, :manufacturer , :string
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddMinOrderQuantity < ActiveRecord::Migration
|
class AddMinOrderQuantity < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :suppliers, :min_order_quantity, :string
|
add_column :suppliers, :min_order_quantity, :string
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateInvites < ActiveRecord::Migration
|
class CreateInvites < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :invites do |t|
|
create_table :invites do |t|
|
||||||
t.column :token, :string, :null => false
|
t.column :token, :string, :null => false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveUniquenessOfArticleName < ActiveRecord::Migration
|
class RemoveUniquenessOfArticleName < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
remove_index :articles, :name
|
remove_index :articles, :name
|
||||||
add_index :articles, [:name, :supplier_id]
|
add_index :articles, [:name, :supplier_id]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddUsersLastLogin < ActiveRecord::Migration
|
class AddUsersLastLogin < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :users, :last_login, :datetime
|
add_column :users, :last_login, :datetime
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveTableArticlePrices < ActiveRecord::Migration
|
class RemoveTableArticlePrices < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
|
|
||||||
puts "create columns in articles ..."
|
puts "create columns in articles ..."
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddRequiredUserForTask < ActiveRecord::Migration
|
class AddRequiredUserForTask < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :tasks, :required_users, :integer, :default => 1
|
add_column :tasks, :required_users, :integer, :default => 1
|
||||||
add_column :groups, :task_required_users, :integer, :default => 1
|
add_column :groups, :task_required_users, :integer, :default => 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class NewWording < ActiveRecord::Migration
|
class NewWording < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
rename_column :articles, :clear_price, :net_price
|
rename_column :articles, :clear_price, :net_price
|
||||||
rename_column :articles, :refund, :deposit
|
rename_column :articles, :refund, :deposit
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddDepositDefaults < ActiveRecord::Migration
|
class AddDepositDefaults < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
change_column_default :articles, :deposit, 0.0
|
change_column_default :articles, :deposit, 0.0
|
||||||
change_column_default :order_article_results, :net_price, 0.0
|
change_column_default :order_article_results, :net_price, 0.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ExtendComments < ActiveRecord::Migration
|
class ExtendComments < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
change_column :comments, :comment, :text, :default => ""
|
change_column :comments, :comment, :text, :default => ""
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
class OrderGroup < Group; end # Needed for renaming of OrderGroup to Ordergroup
|
class OrderGroup < Group; end # Needed for renaming of OrderGroup to Ordergroup
|
||||||
|
|
||||||
class RoadToVersionThree < ActiveRecord::Migration
|
class RoadToVersionThree < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
# TODO: Combine migrations since foodsoft3-development into one file
|
# TODO: Combine migrations since foodsoft3-development into one file
|
||||||
# and try to build a migration path from old data.
|
# and try to build a migration path from old data.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddProfitToOrders < ActiveRecord::Migration
|
class AddProfitToOrders < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :orders, :foodcoop_result, :decimal, :precision => 8, :scale => 2
|
add_column :orders, :foodcoop_result, :decimal, :precision => 8, :scale => 2
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# This migration comes from foodsoft_wiki_engine (originally 20090325175756)
|
# This migration comes from foodsoft_wiki_engine (originally 20090325175756)
|
||||||
class CreatePages < ActiveRecord::Migration
|
class CreatePages < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :pages do |t|
|
create_table :pages do |t|
|
||||||
t.string :title
|
t.string :title
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ModifyGroupOrderArticleResult < ActiveRecord::Migration
|
class ModifyGroupOrderArticleResult < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
change_column :group_order_articles, :result, :decimal, :precision => 8, :scale => 3
|
change_column :group_order_articles, :result, :decimal, :precision => 8, :scale => 3
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddStatsToGroups < ActiveRecord::Migration
|
class AddStatsToGroups < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :groups, :stats, :text
|
add_column :groups, :stats, :text
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddWeeklyToTasks < ActiveRecord::Migration
|
class AddWeeklyToTasks < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :tasks, :weekly, :boolean
|
add_column :tasks, :weekly, :boolean
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddNoteToDeliveries < ActiveRecord::Migration
|
class AddNoteToDeliveries < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :deliveries, :note, :text
|
add_column :deliveries, :note, :text
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddMissingIndexes < ActiveRecord::Migration
|
class AddMissingIndexes < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_index "article_prices", ["article_id"]
|
add_index "article_prices", ["article_id"]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddDurationToTasks < ActiveRecord::Migration
|
class AddDurationToTasks < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :tasks, :duration, :integer, :default => 1
|
add_column :tasks, :duration, :integer, :default => 1
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddTaskDurationToWorkgroups < ActiveRecord::Migration
|
class AddTaskDurationToWorkgroups < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :groups, :task_duration, :integer, :default => 1
|
add_column :groups, :task_duration, :integer, :default => 1
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddOrderIndexes < ActiveRecord::Migration
|
class AddOrderIndexes < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_index :group_order_articles, :group_order_id
|
add_index :group_order_articles, :group_order_id
|
||||||
add_index :group_order_articles, :order_article_id
|
add_index :group_order_articles, :order_article_id
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddNextWeeklyTasksNumberToWorkgroups < ActiveRecord::Migration
|
class AddNextWeeklyTasksNumberToWorkgroups < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :groups, :next_weekly_tasks_number, :integer, :default => 8
|
add_column :groups, :next_weekly_tasks_number, :integer, :default => 8
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddIgnoreAppleRestrictionToGroups < ActiveRecord::Migration
|
class AddIgnoreAppleRestrictionToGroups < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :groups, :ignore_apple_restriction, :boolean, default: false
|
add_column :groups, :ignore_apple_restriction, :boolean, default: false
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddCreatedByUserIdToOrders < ActiveRecord::Migration
|
class AddCreatedByUserIdToOrders < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
add_column :orders, :created_by_user_id, :integer
|
add_column :orders, :created_by_user_id, :integer
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveAssignedFromTasks < ActiveRecord::Migration
|
class RemoveAssignedFromTasks < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
remove_column :tasks, :assigned
|
remove_column :tasks, :assigned
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveAccountUpdatedFromOrdergroups < ActiveRecord::Migration
|
class RemoveAccountUpdatedFromOrdergroups < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
remove_column :groups, :account_updated
|
remove_column :groups, :account_updated
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreatePeriodicTaskGroups < ActiveRecord::Migration
|
class CreatePeriodicTaskGroups < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :periodic_task_groups do |t|
|
create_table :periodic_task_groups do |t|
|
||||||
t.date :next_task_date
|
t.date :next_task_date
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class MoveWeeklyTasks < ActiveRecord::Migration
|
class MoveWeeklyTasks < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
Workgroup.where(weekly_task: true).each do |workgroup|
|
Workgroup.where(weekly_task: true).each do |workgroup|
|
||||||
task_group = PeriodicTaskGroup.create
|
task_group = PeriodicTaskGroup.create
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveWeeklyFromTasks < ActiveRecord::Migration
|
class RemoveWeeklyFromTasks < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
remove_column :tasks, :weekly
|
remove_column :tasks, :weekly
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveWeeklyTaskFromGroups < ActiveRecord::Migration
|
class RemoveWeeklyTaskFromGroups < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
remove_column :groups, :weekly_task
|
remove_column :groups, :weekly_task
|
||||||
remove_column :groups, :weekday
|
remove_column :groups, :weekday
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class UpdateGroupOrderTotals < ActiveRecord::Migration
|
class UpdateGroupOrderTotals < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
say "If you have ever modified an order after it was settled, the group_order's " +
|
say "If you have ever modified an order after it was settled, the group_order's " +
|
||||||
"price may be calculated incorrectly. This can take a lot of time on a " +
|
"price may be calculated incorrectly. This can take a lot of time on a " +
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateSettings < ActiveRecord::Migration
|
class CreateSettings < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :settings do |t|
|
create_table :settings do |t|
|
||||||
t.string :var, null: false
|
t.string :var, null: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class MigrateUserSettings < ActiveRecord::Migration
|
class MigrateUserSettings < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
say_with_time 'Save old user settings in new RailsSettings module' do
|
say_with_time 'Save old user settings in new RailsSettings module' do
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AllowMissingNick < ActiveRecord::Migration
|
class AllowMissingNick < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
change_column :users, :nick, :string, :default => nil, :null => true
|
change_column :users, :nick, :string, :default => nil, :null => true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddQuantitiesToOrderArticle < ActiveRecord::Migration
|
class AddQuantitiesToOrderArticle < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :order_articles, :units_billed, :integer
|
add_column :order_articles, :units_billed, :integer
|
||||||
add_column :order_articles, :units_received, :integer
|
add_column :order_articles, :units_received, :integer
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddResultComputedToGroupOrderArticles < ActiveRecord::Migration
|
class AddResultComputedToGroupOrderArticles < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :group_order_articles, :result_computed,
|
add_column :group_order_articles, :result_computed,
|
||||||
:decimal, :precision => 8, :scale => 3
|
:decimal, :precision => 8, :scale => 3
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class DeleteEmptyGroupOrderArticles < ActiveRecord::Migration
|
class DeleteEmptyGroupOrderArticles < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
# up until recently, group_order_articles with all quantities zero were saved
|
# up until recently, group_order_articles with all quantities zero were saved
|
||||||
GroupOrderArticle.where(quantity: 0, tolerance: 0, result: [0, nil], result_computed: [0, nil]).delete_all
|
GroupOrderArticle.where(quantity: 0, tolerance: 0, result: [0, nil], result_computed: [0, nil]).delete_all
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddSyncMethodToSupplier < ActiveRecord::Migration
|
class AddSyncMethodToSupplier < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :suppliers, :shared_sync_method, :string
|
add_column :suppliers, :shared_sync_method, :string
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class RemoveStaleMemberships < ActiveRecord::Migration
|
class RemoveStaleMemberships < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
Membership.where("group_id NOT IN (?)", Group.ids).delete_all
|
Membership.where("group_id NOT IN (?)", Group.ids).delete_all
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class IncreaseAccountBalancePrecision < ActiveRecord::Migration
|
class IncreaseAccountBalancePrecision < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
change_column :groups, :account_balance, :decimal, precision: 12, scale: 2
|
change_column :groups, :account_balance, :decimal, precision: 12, scale: 2
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddReplytoAndGroupidToMessages < ActiveRecord::Migration
|
class AddReplytoAndGroupidToMessages < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :messages, :reply_to, :integer
|
add_column :messages, :reply_to, :integer
|
||||||
add_column :messages, :group_id, :integer
|
add_column :messages, :group_id, :integer
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddLastActivityToUser < ActiveRecord::Migration
|
class AddLastActivityToUser < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :users, :last_activity, :datetime
|
add_column :users, :last_activity, :datetime
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddBoxfillToOrder < ActiveRecord::Migration
|
class AddBoxfillToOrder < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :orders, :boxfill, :datetime
|
add_column :orders, :boxfill, :datetime
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddDeletedAtToUser < ActiveRecord::Migration
|
class AddDeletedAtToUser < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :users, :deleted_at, :datetime
|
add_column :users, :deleted_at, :datetime
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddCreatedByUserIdToInvoice < ActiveRecord::Migration
|
class AddCreatedByUserIdToInvoice < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :invoices, :created_by_user_id, :integer
|
add_column :invoices, :created_by_user_id, :integer
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeInvoiceRelation < ActiveRecord::Migration
|
class ChangeInvoiceRelation < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
add_column :deliveries, :invoice_id, :integer
|
add_column :deliveries, :invoice_id, :integer
|
||||||
execute 'UPDATE deliveries SET invoice_id = (SELECT id FROM invoices WHERE delivery_id = deliveries.id)'
|
execute 'UPDATE deliveries SET invoice_id = (SELECT id FROM invoices WHERE delivery_id = deliveries.id)'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddPickupToOrder < ActiveRecord::Migration
|
class AddPickupToOrder < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :orders, :pickup, :date
|
add_column :orders, :pickup, :date
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddBreakToGroup < ActiveRecord::Migration
|
class AddBreakToGroup < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :groups, :break_start, :date
|
add_column :groups, :break_start, :date
|
||||||
add_column :groups, :break_end, :date
|
add_column :groups, :break_end, :date
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddRoleInvoicesToGroup < ActiveRecord::Migration
|
class AddRoleInvoicesToGroup < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :groups, :role_invoices, :boolean, :default => false, :null => false
|
add_column :groups, :role_invoices, :boolean, :default => false, :null => false
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddAttachmentToInvoice < ActiveRecord::Migration
|
class AddAttachmentToInvoice < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :invoices, :attachment_mime, :string
|
add_column :invoices, :attachment_mime, :string
|
||||||
add_column :invoices, :attachment_data, :binary, :limit => 8.megabyte
|
add_column :invoices, :attachment_data, :binary, :limit => 8.megabyte
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateFinancialTransactionClassAndTypes < ActiveRecord::Migration
|
class CreateFinancialTransactionClassAndTypes < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :financial_transaction_classes do |t|
|
create_table :financial_transaction_classes do |t|
|
||||||
t.string :name, :null => false
|
t.string :name, :null => false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateDocuments < ActiveRecord::Migration
|
class CreateDocuments < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :documents do |t|
|
create_table :documents do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateBankAccountsAndTransactions < ActiveRecord::Migration
|
class CreateBankAccountsAndTransactions < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :bank_accounts do |t|
|
create_table :bank_accounts do |t|
|
||||||
t.string :name, null: false
|
t.string :name, null: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AllowStockGroupOrder < ActiveRecord::Migration
|
class AllowStockGroupOrder < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
change_column :group_orders, :ordergroup_id, :integer, :default => nil, :null => true
|
change_column :group_orders, :ordergroup_id, :integer, :default => nil, :null => true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# This migration comes from foodsoft_messages_engine (originally 20160226000000)
|
# This migration comes from foodsoft_messages_engine (originally 20160226000000)
|
||||||
class AddEmailToMessage < ActiveRecord::Migration
|
class AddEmailToMessage < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :messages, :salt, :string
|
add_column :messages, :salt, :string
|
||||||
add_column :messages, :received_email, :binary, :limit => 1.megabyte
|
add_column :messages, :received_email, :binary, :limit => 1.megabyte
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateDoorkeeperTables < ActiveRecord::Migration
|
class CreateDoorkeeperTables < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :oauth_applications do |t|
|
create_table :oauth_applications do |t|
|
||||||
t.string :name, null: false
|
t.string :name, null: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddIbanToSupplierAndUser < ActiveRecord::Migration
|
class AddIbanToSupplierAndUser < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :suppliers, :iban, :string
|
add_column :suppliers, :iban, :string
|
||||||
add_column :users, :iban, :string
|
add_column :users, :iban, :string
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateMailDeliveryStatus < ActiveRecord::Migration
|
class CreateMailDeliveryStatus < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :mail_delivery_status do |t|
|
create_table :mail_delivery_status do |t|
|
||||||
t.datetime :created_at
|
t.datetime :created_at
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddLastSentMailToOrder < ActiveRecord::Migration
|
class AddLastSentMailToOrder < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :orders, :last_sent_mail, :datetime
|
add_column :orders, :last_sent_mail, :datetime
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddEndActionToOrder < ActiveRecord::Migration
|
class AddEndActionToOrder < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :orders, :end_action, :integer, default: 0, null: false
|
add_column :orders, :end_action, :integer, default: 0, null: false
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateFinancialLinks < ActiveRecord::Migration
|
class CreateFinancialLinks < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :financial_links do |t|
|
create_table :financial_links do |t|
|
||||||
t.text :note
|
t.text :note
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddParentToDocument < ActiveRecord::Migration
|
class AddParentToDocument < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_reference :documents, :parent, index: true
|
add_reference :documents, :parent, index: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddRolePickupsToGroup < ActiveRecord::Migration
|
class AddRolePickupsToGroup < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :groups, :role_pickups, :boolean, default: false, null: false
|
add_column :groups, :role_pickups, :boolean, default: false, null: false
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddNameShortToFinancialTransactionType < ActiveRecord::Migration
|
class AddNameShortToFinancialTransactionType < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :financial_transaction_types, :name_short, :string
|
add_column :financial_transaction_types, :name_short, :string
|
||||||
add_index :financial_transaction_types, :name_short
|
add_index :financial_transaction_types, :name_short
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddConfidentialToApplications < ActiveRecord::Migration
|
class AddConfidentialToApplications < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :oauth_applications, :confidential, :boolean, null: false, default: true
|
add_column :oauth_applications, :confidential, :boolean, null: false, default: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreatePolls < ActiveRecord::Migration
|
class CreatePolls < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :polls do |t|
|
create_table :polls do |t|
|
||||||
t.integer :created_by_user_id, null: false
|
t.integer :created_by_user_id, null: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class IncreaseChoicesSize < ActiveRecord::Migration
|
class IncreaseChoicesSize < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
change_column :polls, :choices, :text, limit: 65535
|
change_column :polls, :choices, :text, limit: 65535
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreatePrinterJobs < ActiveRecord::Migration
|
class CreatePrinterJobs < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :printer_jobs do |t|
|
create_table :printer_jobs do |t|
|
||||||
t.references :order
|
t.references :order
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateMessageRecipients < ActiveRecord::Migration
|
class CreateMessageRecipients < ActiveRecord::Migration[4.2]
|
||||||
class Message < ActiveRecord::Base
|
class Message < ActiveRecord::Base
|
||||||
has_many :message_recipients
|
has_many :message_recipients
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddDeletedToFinancialTransactionType < ActiveRecord::Migration
|
class AddDeletedToFinancialTransactionType < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
change_table :financial_transactions do |t|
|
change_table :financial_transactions do |t|
|
||||||
t.integer :reverts_id
|
t.integer :reverts_id
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddGroupOrderToFinancialTransaction < ActiveRecord::Migration
|
class AddGroupOrderToFinancialTransaction < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_reference :financial_transactions, :group_order
|
add_reference :financial_transactions, :group_order
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddTransportToOrder < ActiveRecord::Migration
|
class AddTransportToOrder < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :orders, :transport, :decimal, precision: 8, scale: 2
|
add_column :orders, :transport, :decimal, precision: 8, scale: 2
|
||||||
add_column :group_orders, :transport, :decimal, precision: 8, scale: 2
|
add_column :group_orders, :transport, :decimal, precision: 8, scale: 2
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AllowEmtpyOrdergroupInFinancialTransaction < ActiveRecord::Migration
|
class AllowEmtpyOrdergroupInFinancialTransaction < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
change_column_null :financial_transactions, :ordergroup_id, true
|
change_column_null :financial_transactions, :ordergroup_id, true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeOrdergroupDefaultInFinancialTransaction < ActiveRecord::Migration
|
class ChangeOrdergroupDefaultInFinancialTransaction < ActiveRecord::Migration[4.2]
|
||||||
class FinancialTransaction < ActiveRecord::Base; end
|
class FinancialTransaction < ActiveRecord::Base; end
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeStockSupplierToNullInOrder < ActiveRecord::Migration
|
class ChangeStockSupplierToNullInOrder < ActiveRecord::Migration[4.2]
|
||||||
class Order < ActiveRecord::Base; end
|
class Order < ActiveRecord::Base; end
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class EnsureArticleForArticlePrice < ActiveRecord::Migration
|
class EnsureArticleForArticlePrice < ActiveRecord::Migration[4.2]
|
||||||
class ArticlePrice < ActiveRecord::Base; end
|
class ArticlePrice < ActiveRecord::Base; end
|
||||||
|
|
||||||
def change
|
def change
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateSupplierCategories < ActiveRecord::Migration
|
class CreateSupplierCategories < ActiveRecord::Migration[4.2]
|
||||||
class FinancialTransactionClass < ActiveRecord::Base; end
|
class FinancialTransactionClass < ActiveRecord::Base; end
|
||||||
class SupplierCategory < ActiveRecord::Base; end
|
class SupplierCategory < ActiveRecord::Base; end
|
||||||
class Supplier < ActiveRecord::Base; end
|
class Supplier < ActiveRecord::Base; end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateLinks < ActiveRecord::Migration
|
class CreateLinks < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
create_table :links do |t|
|
create_table :links do |t|
|
||||||
t.string :name, null: false
|
t.string :name, null: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ClearInvalidInvoicesFromOrders < ActiveRecord::Migration
|
class ClearInvalidInvoicesFromOrders < ActiveRecord::Migration[4.2]
|
||||||
class Order < ActiveRecord::Base; end
|
class Order < ActiveRecord::Base; end
|
||||||
class Invoice < ActiveRecord::Base; end
|
class Invoice < ActiveRecord::Base; end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeMarkedAsDeletedNames < ActiveRecord::Migration
|
class ChangeMarkedAsDeletedNames < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
execute "UPDATE groups SET name = REPLACE(name, '\\u2020', '\u2020') WHERE deleted_at IS NOT NULL"
|
execute "UPDATE groups SET name = REPLACE(name, '\\u2020', '\u2020') WHERE deleted_at IS NOT NULL"
|
||||||
execute "UPDATE suppliers SET name = REPLACE(name, '\\u2020', '\u2020') WHERE deleted_at IS NOT NULL"
|
execute "UPDATE suppliers SET name = REPLACE(name, '\\u2020', '\u2020') WHERE deleted_at IS NOT NULL"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeDeliveredOnToDate < ActiveRecord::Migration
|
class ChangeDeliveredOnToDate < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
rename_column :deliveries, :delivered_on, :date
|
rename_column :deliveries, :delivered_on, :date
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateStockEvents < ActiveRecord::Migration
|
class CreateStockEvents < ActiveRecord::Migration[4.2]
|
||||||
class StockEvent < ActiveRecord::Base; end
|
class StockEvent < ActiveRecord::Base; end
|
||||||
class StockTaking < ActiveRecord::Base; end
|
class StockTaking < ActiveRecord::Base; end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddUserToTask < ActiveRecord::Migration
|
class AddUserToTask < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :tasks, :created_by_user_id, :integer
|
add_column :tasks, :created_by_user_id, :integer
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class AddBankAccountToFinancialTransactionType < ActiveRecord::Migration
|
class AddBankAccountToFinancialTransactionType < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_reference :financial_transaction_types, :bank_account
|
add_reference :financial_transaction_types, :bank_account
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateDocuments < ActiveRecord::Migration
|
class CreateDocuments < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
create_table :documents do |t|
|
create_table :documents do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue