Added explicit Rails version to migrations as needed for Rails 6
This commit is contained in:
parent
208c99341a
commit
cc080191fb
18 changed files with 18 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
|||
class CreatePackages < ActiveRecord::Migration
|
||||
class CreatePackages < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
change_table :packages do |t|
|
||||
t.timestamps
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateScreenshots < ActiveRecord::Migration
|
||||
class CreateScreenshots < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
change_table :screenshots do |t|
|
||||
t.timestamps
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddSearchIndexToPackages < ActiveRecord::Migration
|
||||
class AddSearchIndexToPackages < ActiveRecord::Migration[5.0]
|
||||
def up
|
||||
execute "create index packages_name on packages using gin(to_tsvector('english', name))"
|
||||
execute "create index packages_description on packages using gin(to_tsvector('english', description))"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class DropDebtagsTable < ActiveRecord::Migration
|
||||
class DropDebtagsTable < ActiveRecord::Migration[5.0]
|
||||
def up
|
||||
drop_table :packages_to_debtags
|
||||
drop_table :debtags
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class FixSearchIndexInPackages < ActiveRecord::Migration
|
||||
class FixSearchIndexInPackages < ActiveRecord::Migration[5.0]
|
||||
def up
|
||||
execute "drop index packages_name"
|
||||
execute "drop index packages_description"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddAttachmentImageToScreenshots < ActiveRecord::Migration
|
||||
class AddAttachmentImageToScreenshots < ActiveRecord::Migration[5.0]
|
||||
def self.up
|
||||
change_table :screenshots do |t|
|
||||
t.attachment :image
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddFingerprintColumnToScreenshot < ActiveRecord::Migration
|
||||
class AddFingerprintColumnToScreenshot < ActiveRecord::Migration[5.0]
|
||||
def self.up
|
||||
add_column :screenshots, :image_fingerprint, :string
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class ChangePackageLongdescriptionToText < ActiveRecord::Migration
|
||||
class ChangePackageLongdescriptionToText < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
change_column :packages, :long_description, :text
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateLogs < ActiveRecord::Migration
|
||||
class CreateLogs < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :logs do |t|
|
||||
t.string :message # text message
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class DeleteAdminsTable < ActiveRecord::Migration
|
||||
class DeleteAdminsTable < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
drop_table :admins
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateUsers < ActiveRecord::Migration
|
||||
class CreateUsers < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.text :realname
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class MakePackageNameNotNull < ActiveRecord::Migration
|
||||
class MakePackageNameNotNull < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
change_column :packages, :name, :string, null: false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddDeviseToUsers < ActiveRecord::Migration
|
||||
class AddDeviseToUsers < ActiveRecord::Migration[5.0]
|
||||
def self.up
|
||||
change_table(:users) do |t|
|
||||
## Database authenticatable
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class RenameUploaddatetime < ActiveRecord::Migration
|
||||
class RenameUploaddatetime < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
remove_column :screenshots, :created_at
|
||||
rename_column :screenshots, :uploaddatetime, :created_at
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddDefaultToScreenshotApproved < ActiveRecord::Migration
|
||||
class AddDefaultToScreenshotApproved < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
change_column :screenshots, :approved, :boolean, default: false, null: false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class ScreenshotsEnlargeDescription < ActiveRecord::Migration
|
||||
class ScreenshotsEnlargeDescription < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
change_column :screenshots, :description, :text, limit: 80
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddVisitsToPackages < ActiveRecord::Migration
|
||||
class AddVisitsToPackages < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :packages, :visits, :integer, default: 0
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# PostregreSQL text searches are now using weights. So the index has to reflect that.
|
||||
class MakeFulltextSearchIndexWeighted < ActiveRecord::Migration
|
||||
class MakeFulltextSearchIndexWeighted < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
execute "drop index packages_fts"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue