aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-12-17 12:37:40 +0100
committerHarald Eilertsen <haraldei@anduin.net>2017-12-17 12:37:40 +0100
commit189407cc44275016a0b00798a3dac704f870f8c0 (patch)
tree25e56578e3d3979ccf10934f3d8c42177d82c0dc /db/migrate
parent09b23f8457bb1a3c26d10ffbfab930176d984015 (diff)
downloadhmnoweb-189407cc44275016a0b00798a3dac704f870f8c0.tar.gz
hmnoweb-189407cc44275016a0b00798a3dac704f870f8c0.tar.bz2
hmnoweb-189407cc44275016a0b00798a3dac704f870f8c0.zip
Install GalleryLinks extension into main app.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20171217104241_create_gallery_links_gallery_links.refinery_gallery_links.rb31
1 files changed, 31 insertions, 0 deletions
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