From 50f1fc25aa7e0c58c34360c9f8cd14bcfceeede3 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Fri, 16 Jul 2021 12:58:13 -0500 Subject: [PATCH] Upgrade migrations --- .../20101006095323_create_categories.rb | 2 +- db/migrate/20101006095457_create_photos.rb | 2 +- .../20101008101157_add_photo_to_category.rb | 2 +- .../20101008103053_add_details_to_photo.rb | 2 +- .../20101008105348_add_colour_to_category.rb | 2 +- db/migrate/20101008122736_add_sort_orders.rb | 2 +- .../20101008172319_move_to_many_to_many.rb | 2 +- .../20101011133558_create_admin_users.rb | 2 +- db/migrate/20101012132954_create_pages.rb | 2 +- db/migrate/20101013165208_photo_showcase.rb | 2 +- .../20101202155552_add_enabled_to_photos.rb | 2 +- .../20101215172105_add_taken_date_to_photo.rb | 2 +- ...20101216180143_add_view_count_to_photos.rb | 2 +- .../20111013085444_add_sessions_table.rb | 2 +- .../20111030163656_remove_admin_users.rb | 2 +- ...0111030164012_create_devise_admin_users.rb | 2 +- .../20130522071132_add_slug_to_categories.rb | 2 +- ...307120615_add_dragonfly_image_to_photos.rb | 2 +- ...39_remove_paperclip_columns_from_photos.rb | 2 +- ...27205816_add_index_to_categories_photos.rb | 2 +- ...0151022110802_remove_devise_admin_users.rb | 2 +- db/migrate/20151023165644_create_users.rb | 2 +- db/schema.rb | 38 +++++++++---------- 23 files changed, 41 insertions(+), 41 deletions(-) diff --git a/db/migrate/20101006095323_create_categories.rb b/db/migrate/20101006095323_create_categories.rb index c38da94..54c1df0 100644 --- a/db/migrate/20101006095323_create_categories.rb +++ b/db/migrate/20101006095323_create_categories.rb @@ -1,4 +1,4 @@ -class CreateCategories < ActiveRecord::Migration +class CreateCategories < ActiveRecord::Migration[5.1] def self.up create_table :categories do |t| t.string :name diff --git a/db/migrate/20101006095457_create_photos.rb b/db/migrate/20101006095457_create_photos.rb index da140d0..c46cd90 100644 --- a/db/migrate/20101006095457_create_photos.rb +++ b/db/migrate/20101006095457_create_photos.rb @@ -1,4 +1,4 @@ -class CreatePhotos < ActiveRecord::Migration +class CreatePhotos < ActiveRecord::Migration[5.1] def self.up create_table :photos do |t| t.integer :category_id diff --git a/db/migrate/20101008101157_add_photo_to_category.rb b/db/migrate/20101008101157_add_photo_to_category.rb index 832daa4..8f686f1 100644 --- a/db/migrate/20101008101157_add_photo_to_category.rb +++ b/db/migrate/20101008101157_add_photo_to_category.rb @@ -1,4 +1,4 @@ -class AddPhotoToCategory < ActiveRecord::Migration +class AddPhotoToCategory < ActiveRecord::Migration[5.1] def self.up add_column :categories, :photo_id, :integer end diff --git a/db/migrate/20101008103053_add_details_to_photo.rb b/db/migrate/20101008103053_add_details_to_photo.rb index f8e44b1..1e9d0f9 100644 --- a/db/migrate/20101008103053_add_details_to_photo.rb +++ b/db/migrate/20101008103053_add_details_to_photo.rb @@ -1,4 +1,4 @@ -class AddDetailsToPhoto < ActiveRecord::Migration +class AddDetailsToPhoto < ActiveRecord::Migration[5.1] def self.up add_column :photos, :title, :string add_column :photos, :description, :text diff --git a/db/migrate/20101008105348_add_colour_to_category.rb b/db/migrate/20101008105348_add_colour_to_category.rb index 47e163f..cf0560c 100644 --- a/db/migrate/20101008105348_add_colour_to_category.rb +++ b/db/migrate/20101008105348_add_colour_to_category.rb @@ -1,4 +1,4 @@ -class AddColourToCategory < ActiveRecord::Migration +class AddColourToCategory < ActiveRecord::Migration[5.1] def self.up add_column :categories, :base_colour, :string end diff --git a/db/migrate/20101008122736_add_sort_orders.rb b/db/migrate/20101008122736_add_sort_orders.rb index bab57e1..14c03be 100644 --- a/db/migrate/20101008122736_add_sort_orders.rb +++ b/db/migrate/20101008122736_add_sort_orders.rb @@ -1,4 +1,4 @@ -class AddSortOrders < ActiveRecord::Migration +class AddSortOrders < ActiveRecord::Migration[5.1] def self.up add_column :photos, :sort, :integer add_column :categories, :sort, :integer diff --git a/db/migrate/20101008172319_move_to_many_to_many.rb b/db/migrate/20101008172319_move_to_many_to_many.rb index 465649f..202707b 100644 --- a/db/migrate/20101008172319_move_to_many_to_many.rb +++ b/db/migrate/20101008172319_move_to_many_to_many.rb @@ -1,4 +1,4 @@ -class MoveToManyToMany < ActiveRecord::Migration +class MoveToManyToMany < ActiveRecord::Migration[5.1] def self.up remove_column :photos, :category_id create_table :categories_photos, id: false do |t| diff --git a/db/migrate/20101011133558_create_admin_users.rb b/db/migrate/20101011133558_create_admin_users.rb index dc885ec..7e2901d 100644 --- a/db/migrate/20101011133558_create_admin_users.rb +++ b/db/migrate/20101011133558_create_admin_users.rb @@ -1,4 +1,4 @@ -class CreateAdminUsers < ActiveRecord::Migration +class CreateAdminUsers < ActiveRecord::Migration[5.1] def self.up create_table :admin_users do |t| t.string :first_name, default: "", null: false diff --git a/db/migrate/20101012132954_create_pages.rb b/db/migrate/20101012132954_create_pages.rb index d4d887c..29d2bdf 100644 --- a/db/migrate/20101012132954_create_pages.rb +++ b/db/migrate/20101012132954_create_pages.rb @@ -1,4 +1,4 @@ -class CreatePages < ActiveRecord::Migration +class CreatePages < ActiveRecord::Migration[5.1] def self.up create_table :pages do |t| t.string :name diff --git a/db/migrate/20101013165208_photo_showcase.rb b/db/migrate/20101013165208_photo_showcase.rb index 62ebf30..9a9a04f 100644 --- a/db/migrate/20101013165208_photo_showcase.rb +++ b/db/migrate/20101013165208_photo_showcase.rb @@ -1,4 +1,4 @@ -class PhotoShowcase < ActiveRecord::Migration +class PhotoShowcase < ActiveRecord::Migration[5.1] def self.up add_column :photos, :featured, :boolean, default: false end diff --git a/db/migrate/20101202155552_add_enabled_to_photos.rb b/db/migrate/20101202155552_add_enabled_to_photos.rb index 86b09e5..671d8d7 100644 --- a/db/migrate/20101202155552_add_enabled_to_photos.rb +++ b/db/migrate/20101202155552_add_enabled_to_photos.rb @@ -1,4 +1,4 @@ -class AddEnabledToPhotos < ActiveRecord::Migration +class AddEnabledToPhotos < ActiveRecord::Migration[5.1] def self.up add_column :photos, :enabled, :boolean, default: true end diff --git a/db/migrate/20101215172105_add_taken_date_to_photo.rb b/db/migrate/20101215172105_add_taken_date_to_photo.rb index 265132a..29f40df 100644 --- a/db/migrate/20101215172105_add_taken_date_to_photo.rb +++ b/db/migrate/20101215172105_add_taken_date_to_photo.rb @@ -1,4 +1,4 @@ -class AddTakenDateToPhoto < ActiveRecord::Migration +class AddTakenDateToPhoto < ActiveRecord::Migration[5.1] def self.up add_column :photos, :taken_at, :datetime end diff --git a/db/migrate/20101216180143_add_view_count_to_photos.rb b/db/migrate/20101216180143_add_view_count_to_photos.rb index 5320637..cbe4a63 100644 --- a/db/migrate/20101216180143_add_view_count_to_photos.rb +++ b/db/migrate/20101216180143_add_view_count_to_photos.rb @@ -1,4 +1,4 @@ -class AddViewCountToPhotos < ActiveRecord::Migration +class AddViewCountToPhotos < ActiveRecord::Migration[5.1] def self.up add_column :photos, :views, :integer, default: 0 end diff --git a/db/migrate/20111013085444_add_sessions_table.rb b/db/migrate/20111013085444_add_sessions_table.rb index 37d1a63..7c6c4d2 100644 --- a/db/migrate/20111013085444_add_sessions_table.rb +++ b/db/migrate/20111013085444_add_sessions_table.rb @@ -1,4 +1,4 @@ -class AddSessionsTable < ActiveRecord::Migration +class AddSessionsTable < ActiveRecord::Migration[5.1] def up create_table :sessions do |t| t.string :session_id, null: false diff --git a/db/migrate/20111030163656_remove_admin_users.rb b/db/migrate/20111030163656_remove_admin_users.rb index 5f3be82..c587e6e 100644 --- a/db/migrate/20111030163656_remove_admin_users.rb +++ b/db/migrate/20111030163656_remove_admin_users.rb @@ -1,4 +1,4 @@ -class RemoveAdminUsers < ActiveRecord::Migration +class RemoveAdminUsers < ActiveRecord::Migration[5.1] def self.up drop_table :admin_users end diff --git a/db/migrate/20111030164012_create_devise_admin_users.rb b/db/migrate/20111030164012_create_devise_admin_users.rb index d833bb9..34f4293 100644 --- a/db/migrate/20111030164012_create_devise_admin_users.rb +++ b/db/migrate/20111030164012_create_devise_admin_users.rb @@ -1,4 +1,4 @@ -class CreateDeviseAdminUsers < ActiveRecord::Migration +class CreateDeviseAdminUsers < ActiveRecord::Migration[5.1] def up create_table(:admin_users) do |t| # Database authenticatable diff --git a/db/migrate/20130522071132_add_slug_to_categories.rb b/db/migrate/20130522071132_add_slug_to_categories.rb index 3615e1b..6a01e34 100644 --- a/db/migrate/20130522071132_add_slug_to_categories.rb +++ b/db/migrate/20130522071132_add_slug_to_categories.rb @@ -1,4 +1,4 @@ -class AddSlugToCategories < ActiveRecord::Migration +class AddSlugToCategories < ActiveRecord::Migration[5.1] def change add_column :categories, :slug, :string end diff --git a/db/migrate/20140307120615_add_dragonfly_image_to_photos.rb b/db/migrate/20140307120615_add_dragonfly_image_to_photos.rb index 0b6c583..50bbdda 100644 --- a/db/migrate/20140307120615_add_dragonfly_image_to_photos.rb +++ b/db/migrate/20140307120615_add_dragonfly_image_to_photos.rb @@ -1,4 +1,4 @@ -class AddDragonflyImageToPhotos < ActiveRecord::Migration +class AddDragonflyImageToPhotos < ActiveRecord::Migration[5.1] def change add_column :photos, :image_uid, :string add_column :photos, :image_name, :string diff --git a/db/migrate/20140308082639_remove_paperclip_columns_from_photos.rb b/db/migrate/20140308082639_remove_paperclip_columns_from_photos.rb index 9aa21d5..c29a22c 100644 --- a/db/migrate/20140308082639_remove_paperclip_columns_from_photos.rb +++ b/db/migrate/20140308082639_remove_paperclip_columns_from_photos.rb @@ -1,4 +1,4 @@ -class RemovePaperclipColumnsFromPhotos < ActiveRecord::Migration +class RemovePaperclipColumnsFromPhotos < ActiveRecord::Migration[5.1] def change remove_column :photos, :photo_file_name remove_column :photos, :photo_content_type diff --git a/db/migrate/20150827205816_add_index_to_categories_photos.rb b/db/migrate/20150827205816_add_index_to_categories_photos.rb index 1d36db8..5e7491c 100644 --- a/db/migrate/20150827205816_add_index_to_categories_photos.rb +++ b/db/migrate/20150827205816_add_index_to_categories_photos.rb @@ -1,4 +1,4 @@ -class AddIndexToCategoriesPhotos < ActiveRecord::Migration +class AddIndexToCategoriesPhotos < ActiveRecord::Migration[5.1] def change add_index :categories_photos, [:category_id, :photo_id], unique: true end diff --git a/db/migrate/20151022110802_remove_devise_admin_users.rb b/db/migrate/20151022110802_remove_devise_admin_users.rb index 5c392e0..5b0d51b 100644 --- a/db/migrate/20151022110802_remove_devise_admin_users.rb +++ b/db/migrate/20151022110802_remove_devise_admin_users.rb @@ -1,4 +1,4 @@ -class RemoveDeviseAdminUsers < ActiveRecord::Migration +class RemoveDeviseAdminUsers < ActiveRecord::Migration[5.1] def up drop_table :admin_users end diff --git a/db/migrate/20151023165644_create_users.rb b/db/migrate/20151023165644_create_users.rb index 9e89afe..8146c52 100644 --- a/db/migrate/20151023165644_create_users.rb +++ b/db/migrate/20151023165644_create_users.rb @@ -1,4 +1,4 @@ -class CreateUsers < ActiveRecord::Migration +class CreateUsers < ActiveRecord::Migration[5.1] def change create_table :users do |t| t.string :email, null: false diff --git a/db/schema.rb b/db/schema.rb index 2092320..0dfe3ef 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,20 +10,20 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151028124718) do +ActiveRecord::Schema.define(version: 2015_10_23_165644) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "categories", force: :cascade do |t| - t.string "name", limit: 255 + t.string "name" t.text "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "photo_id" - t.string "base_colour", limit: 255 + t.string "base_colour" t.integer "sort" - t.string "slug", limit: 255 + t.string "slug" end create_table "categories_photos", id: false, force: :cascade do |t| @@ -33,33 +33,33 @@ ActiveRecord::Schema.define(version: 20151028124718) do end create_table "pages", force: :cascade do |t| - t.string "name", limit: 255 - t.string "title", limit: 255 + t.string "name" + t.string "title" t.text "content" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "photos", force: :cascade do |t| - t.string "flickr_url", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" - t.string "title", limit: 255 + t.string "flickr_url" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "title" t.text "description" t.integer "sort" t.boolean "featured", default: false t.boolean "enabled", default: true t.datetime "taken_at" t.integer "views", default: 0 - t.string "image_uid", limit: 255 - t.string "image_name", limit: 255 + t.string "image_uid" + t.string "image_name" end create_table "sessions", force: :cascade do |t| - t.string "session_id", limit: 255, null: false + t.string "session_id", null: false t.text "data" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["session_id"], name: "index_sessions_on_session_id" t.index ["updated_at"], name: "index_sessions_on_updated_at" end