From 189407cc44275016a0b00798a3dac704f870f8c0 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 17 Dec 2017 12:37:40 +0100 Subject: Install GalleryLinks extension into main app. --- ...y_links_gallery_links.refinery_gallery_links.rb | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 db/migrate/20171217104241_create_gallery_links_gallery_links.refinery_gallery_links.rb (limited to 'db/migrate') diff --git a/db/migrate/20171217104241_create_gallery_links_gallery_links.refinery_gallery_links.rb b/db/migrate/20171217104241_create_gallery_links_gallery_links.refinery_gallery_links.rb new file mode 100644 index 0000000..03a5865 --- /dev/null +++ b/db/migrate/20171217104241_create_gallery_links_gallery_links.refinery_gallery_links.rb @@ -0,0 +1,31 @@ +# This migration comes from refinery_gallery_links (originally 1) +class CreateGalleryLinksGalleryLinks < ActiveRecord::Migration + + def up + create_table :refinery_gallery_links do |t| + t.string :title + t.string :url + t.string :photographer + t.text :description + t.integer :image_id + t.integer :position + + t.timestamps + end + + end + + def down + if defined?(::Refinery::UserPlugin) + ::Refinery::UserPlugin.destroy_all({:name => "refinerycms-gallery_links"}) + end + + if defined?(::Refinery::Page) + ::Refinery::Page.delete_all({:link_url => "/gallery_links/gallery_links"}) + end + + drop_table :refinery_gallery_links + + end + +end -- cgit v1.2.3