alchemy_cms 3.1.1 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +11 -10
- data/app/assets/stylesheets/alchemy/selects.scss +4 -0
- data/app/controllers/alchemy/admin/contents_controller.rb +4 -3
- data/app/models/alchemy/page/page_naming.rb +29 -16
- data/lib/alchemy/controller_actions.rb +3 -4
- data/lib/alchemy/essence.rb +4 -4
- data/lib/alchemy/permissions.rb +1 -1
- data/lib/alchemy/version.rb +1 -1
- data/spec/controllers/admin/contents_controller_spec.rb +9 -4
- data/spec/dummy/app/models/dummy_model.rb +3 -0
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +1 -0
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +1 -0
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +1 -0
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +1 -0
- data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +1 -0
- data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +1 -0
- data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +1 -0
- data/spec/dummy/db/migrate/20150412103152_create_dummy_model.rb +7 -0
- data/spec/dummy/db/schema.rb +30 -26
- data/spec/dummy/spec/javascripts +1 -0
- data/spec/features/admin/page_creation_feature_spec.rb +2 -2
- data/spec/features/admin/picture_library_integration_spec.rb +32 -28
- data/spec/features/picture_security_spec.rb +2 -2
- data/spec/libraries/permissions_spec.rb +9 -0
- data/spec/models/dummy_model_spec.rb +11 -0
- data/spec/models/page_spec.rb +13 -1
- metadata +17 -3
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -397
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +0 -5
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +0 -5
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +0 -5
- data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +0 -21
- data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +0 -14
- data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +0 -9
@@ -0,0 +1 @@
|
|
1
|
+
../../../spec/javascripts
|
@@ -30,8 +30,8 @@ module Alchemy
|
|
30
30
|
|
31
31
|
it "the create page tab is visible by default" do
|
32
32
|
within('#overlay_tabs') do
|
33
|
-
expect(
|
34
|
-
expect(
|
33
|
+
expect(page).to have_selector('#create_page_tab', visible: true)
|
34
|
+
expect(page).to have_selector('#paste_page_tab')
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -1,58 +1,62 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
RSpec.feature "Picture Library" do
|
5
4
|
before do
|
6
5
|
authorize_as_admin
|
7
6
|
end
|
8
7
|
|
9
8
|
describe "Tagging" do
|
9
|
+
let!(:picture_1) { create(:picture, tag_list: 'tag1', name: 'TaggedWith1') }
|
10
|
+
let!(:picture_2) { create(:picture, tag_list: 'tag2', name: 'TaggedWith2') }
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
picture = FactoryGirl.create(:picture, tag_list: 'tag2', name: 'TaggedWith2')
|
14
|
-
end
|
12
|
+
scenario "it's possible to filter tags by clicking on its name in the tag list." do
|
13
|
+
visit alchemy.admin_pictures_path
|
15
14
|
|
16
|
-
it "it should be possible to filter tags by clicking on its name in the tag list" do
|
17
|
-
visit '/admin/pictures'
|
18
15
|
click_on 'tag1 (1)'
|
19
|
-
|
20
|
-
expect(page).
|
16
|
+
|
17
|
+
expect(page).to have_content('TaggedWith1')
|
18
|
+
expect(page).not_to have_content('TaggedWith2')
|
21
19
|
end
|
22
20
|
|
23
|
-
|
24
|
-
visit
|
21
|
+
scenario "it's possible to undo tag filtering by clicking on an active tag name" do
|
22
|
+
visit alchemy.admin_pictures_path
|
23
|
+
|
25
24
|
click_on 'tag1 (1)'
|
26
|
-
|
25
|
+
|
26
|
+
expect(page).to have_content('TaggedWith1')
|
27
|
+
expect(page).not_to have_content('TaggedWith2')
|
28
|
+
|
27
29
|
click_on 'tag1 (1)'
|
28
|
-
|
30
|
+
|
31
|
+
expect(page).to have_content('TaggedWith1')
|
32
|
+
expect(page).to have_content('TaggedWith2')
|
29
33
|
end
|
30
34
|
|
31
|
-
|
32
|
-
visit
|
35
|
+
scenario "it's possible to tighten the tag scope by clicking on another tag name." do
|
36
|
+
visit alchemy.admin_pictures_path
|
37
|
+
|
33
38
|
click_on 'tag1 (1)'
|
34
39
|
click_on 'tag2 (1)'
|
35
|
-
expect(page).to have_content "You don't have any images in your archive"
|
36
|
-
end
|
37
40
|
|
41
|
+
expect(page).to have_content("You don't have any images in your archive")
|
42
|
+
end
|
38
43
|
end
|
39
44
|
|
40
45
|
describe "Filter by tag" do
|
46
|
+
let!(:picture) { create(:picture, tag_list: 'bla') }
|
41
47
|
|
42
|
-
|
43
|
-
|
44
|
-
end
|
48
|
+
scenario "lists all applied tags." do
|
49
|
+
visit alchemy.admin_pictures_path
|
45
50
|
|
46
|
-
|
47
|
-
visit '/admin/pictures'
|
48
|
-
expect(page).to have_content 'bla'
|
51
|
+
expect(page).to have_content('bla')
|
49
52
|
end
|
50
53
|
|
51
|
-
|
52
|
-
visit
|
54
|
+
scenario "it's possible to filter pictures by tag." do
|
55
|
+
visit alchemy.admin_pictures_path
|
56
|
+
|
53
57
|
click_on 'bla (1)'
|
54
|
-
expect(page).to have_content 'bla'
|
55
|
-
end
|
56
58
|
|
59
|
+
expect(page).to have_content('bla')
|
60
|
+
end
|
57
61
|
end
|
58
62
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe 'Picture renderung security'
|
3
|
+
describe 'Picture renderung security' do
|
4
4
|
|
5
5
|
let(:picture) { Alchemy::Picture.create(:image_file => File.new(File.expand_path('../../fixtures/image.png', __FILE__))) }
|
6
6
|
|
@@ -23,7 +23,7 @@ describe 'Picture renderung security', :js => true do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'should return image' do
|
26
|
-
expect(page.body).to match(/
|
26
|
+
expect(page.body).to match(/PNG/)
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should return status ok (200)' do
|
@@ -251,4 +251,13 @@ describe Alchemy::Permissions do
|
|
251
251
|
is_expected.to be_able_to(:manage, Alchemy::Site)
|
252
252
|
end
|
253
253
|
end
|
254
|
+
|
255
|
+
context "A logged in user without a role" do
|
256
|
+
let(:user) { mock_user([]) }
|
257
|
+
|
258
|
+
it "can only see visible not restricted pages (like the guest role)" do
|
259
|
+
is_expected.to be_able_to(:see, visible_page)
|
260
|
+
is_expected.not_to be_able_to(:see, not_visible_page)
|
261
|
+
end
|
262
|
+
end
|
254
263
|
end
|
data/spec/models/page_spec.rb
CHANGED
@@ -55,7 +55,7 @@ module Alchemy
|
|
55
55
|
end
|
56
56
|
|
57
57
|
context "with url_nesting set to true" do
|
58
|
-
let(:other_parent) { FactoryGirl.create(:page, parent_id: Page.root.id) }
|
58
|
+
let(:other_parent) { FactoryGirl.create(:page, parent_id: Page.root.id, visible: true) }
|
59
59
|
|
60
60
|
before do
|
61
61
|
allow(Config).to receive(:get).and_return(true)
|
@@ -1333,6 +1333,18 @@ module Alchemy
|
|
1333
1333
|
expect(contact.urlname).not_to match(/invisible/)
|
1334
1334
|
end
|
1335
1335
|
|
1336
|
+
context "with an invisible parent" do
|
1337
|
+
before { parent.update_attribute(:visible, false) }
|
1338
|
+
|
1339
|
+
it "does not change if set_urlname is called" do
|
1340
|
+
expect { page.send(:set_urlname) }.not_to change { page.urlname }
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
it "does not change if update_urlname! is called" do
|
1344
|
+
expect { page.update_urlname! }.not_to change { page.urlname }
|
1345
|
+
end
|
1346
|
+
end
|
1347
|
+
|
1336
1348
|
context "after changing page's urlname" do
|
1337
1349
|
it "updates urlnames of descendants" do
|
1338
1350
|
page
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionpack-page_caching
|
@@ -97,6 +97,9 @@ dependencies:
|
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '1.9'
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.13.0
|
100
103
|
type: :runtime
|
101
104
|
prerelease: false
|
102
105
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -104,6 +107,9 @@ dependencies:
|
|
104
107
|
- - "~>"
|
105
108
|
- !ruby/object:Gem::Version
|
106
109
|
version: '1.9'
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 1.13.0
|
107
113
|
- !ruby/object:Gem::Dependency
|
108
114
|
name: coffee-rails
|
109
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -987,6 +993,7 @@ files:
|
|
987
993
|
- spec/dummy/app/helpers/application_helper.rb
|
988
994
|
- spec/dummy/app/mailers/.gitkeep
|
989
995
|
- spec/dummy/app/models/ability.rb
|
996
|
+
- spec/dummy/app/models/dummy_model.rb
|
990
997
|
- spec/dummy/app/models/dummy_user.rb
|
991
998
|
- spec/dummy/app/models/event.rb
|
992
999
|
- spec/dummy/app/models/location.rb
|
@@ -1031,6 +1038,7 @@ files:
|
|
1031
1038
|
- spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb
|
1032
1039
|
- spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb
|
1033
1040
|
- spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb
|
1041
|
+
- spec/dummy/db/migrate/20150412103152_create_dummy_model.rb
|
1034
1042
|
- spec/dummy/db/schema.rb
|
1035
1043
|
- spec/dummy/db/seeds.rb
|
1036
1044
|
- spec/dummy/lib/assets/.gitkeep
|
@@ -1038,6 +1046,7 @@ files:
|
|
1038
1046
|
- spec/dummy/public/422.html
|
1039
1047
|
- spec/dummy/public/500.html
|
1040
1048
|
- spec/dummy/public/favicon.ico
|
1049
|
+
- spec/dummy/spec/javascripts
|
1041
1050
|
- spec/features/admin/dashboard_spec.rb
|
1042
1051
|
- spec/features/admin/language_tree_feature_spec.rb
|
1043
1052
|
- spec/features/admin/legacy_page_url_management_spec.rb
|
@@ -1103,6 +1112,7 @@ files:
|
|
1103
1112
|
- spec/models/attachment_spec.rb
|
1104
1113
|
- spec/models/cell_spec.rb
|
1105
1114
|
- spec/models/content_spec.rb
|
1115
|
+
- spec/models/dummy_model_spec.rb
|
1106
1116
|
- spec/models/element_spec.rb
|
1107
1117
|
- spec/models/essence_boolean_spec.rb
|
1108
1118
|
- spec/models/essence_date_spec.rb
|
@@ -1218,7 +1228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1218
1228
|
requirements:
|
1219
1229
|
- ImageMagick (libmagick), v6.6 or greater.
|
1220
1230
|
rubyforge_project:
|
1221
|
-
rubygems_version: 2.
|
1231
|
+
rubygems_version: 2.5.1
|
1222
1232
|
signing_key:
|
1223
1233
|
specification_version: 4
|
1224
1234
|
summary: A powerful, userfriendly and flexible CMS for Rails 4
|
@@ -1257,6 +1267,7 @@ test_files:
|
|
1257
1267
|
- spec/dummy/app/helpers/application_helper.rb
|
1258
1268
|
- spec/dummy/app/mailers/.gitkeep
|
1259
1269
|
- spec/dummy/app/models/ability.rb
|
1270
|
+
- spec/dummy/app/models/dummy_model.rb
|
1260
1271
|
- spec/dummy/app/models/dummy_user.rb
|
1261
1272
|
- spec/dummy/app/models/event.rb
|
1262
1273
|
- spec/dummy/app/models/location.rb
|
@@ -1301,6 +1312,7 @@ test_files:
|
|
1301
1312
|
- spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb
|
1302
1313
|
- spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb
|
1303
1314
|
- spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb
|
1315
|
+
- spec/dummy/db/migrate/20150412103152_create_dummy_model.rb
|
1304
1316
|
- spec/dummy/db/schema.rb
|
1305
1317
|
- spec/dummy/db/seeds.rb
|
1306
1318
|
- spec/dummy/lib/assets/.gitkeep
|
@@ -1308,6 +1320,7 @@ test_files:
|
|
1308
1320
|
- spec/dummy/public/422.html
|
1309
1321
|
- spec/dummy/public/500.html
|
1310
1322
|
- spec/dummy/public/favicon.ico
|
1323
|
+
- spec/dummy/spec/javascripts
|
1311
1324
|
- spec/features/admin/dashboard_spec.rb
|
1312
1325
|
- spec/features/admin/language_tree_feature_spec.rb
|
1313
1326
|
- spec/features/admin/legacy_page_url_management_spec.rb
|
@@ -1373,6 +1386,7 @@ test_files:
|
|
1373
1386
|
- spec/models/attachment_spec.rb
|
1374
1387
|
- spec/models/cell_spec.rb
|
1375
1388
|
- spec/models/content_spec.rb
|
1389
|
+
- spec/models/dummy_model_spec.rb
|
1376
1390
|
- spec/models/element_spec.rb
|
1377
1391
|
- spec/models/essence_boolean_spec.rb
|
1378
1392
|
- spec/models/essence_date_spec.rb
|
@@ -1,397 +0,0 @@
|
|
1
|
-
# This is a compressed migration for creating all Alchemy 2.6 tables at once.
|
2
|
-
#
|
3
|
-
# === Notice
|
4
|
-
#
|
5
|
-
# In order to upgrade from an old version of Alchemy, you have to run all migrations from
|
6
|
-
# each version you missed up to the version you want to upgrade to, before running this migration.
|
7
|
-
#
|
8
|
-
class AlchemyTwoPointSix < ActiveRecord::Migration
|
9
|
-
def up
|
10
|
-
|
11
|
-
unless table_exists?('alchemy_attachments')
|
12
|
-
create_table "alchemy_attachments" do |t|
|
13
|
-
t.string "name"
|
14
|
-
t.string "file_name"
|
15
|
-
t.string "file_mime_type"
|
16
|
-
t.integer "file_size"
|
17
|
-
t.integer "creator_id"
|
18
|
-
t.integer "updater_id"
|
19
|
-
t.datetime "created_at", null: false
|
20
|
-
t.datetime "updated_at", null: false
|
21
|
-
t.text "cached_tag_list"
|
22
|
-
t.string "file_uid"
|
23
|
-
end
|
24
|
-
add_index "alchemy_attachments", ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
|
25
|
-
end
|
26
|
-
|
27
|
-
unless table_exists?('alchemy_cells')
|
28
|
-
create_table "alchemy_cells" do |t|
|
29
|
-
t.integer "page_id"
|
30
|
-
t.string "name"
|
31
|
-
t.datetime "created_at", null: false
|
32
|
-
t.datetime "updated_at", null: false
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
unless table_exists?('alchemy_contents')
|
37
|
-
create_table "alchemy_contents" do |t|
|
38
|
-
t.string "name"
|
39
|
-
t.string "essence_type"
|
40
|
-
t.integer "essence_id"
|
41
|
-
t.integer "element_id"
|
42
|
-
t.integer "position"
|
43
|
-
t.datetime "created_at", null: false
|
44
|
-
t.datetime "updated_at", null: false
|
45
|
-
t.integer "creator_id"
|
46
|
-
t.integer "updater_id"
|
47
|
-
end
|
48
|
-
add_index "alchemy_contents", ["element_id", "position"], name: "index_contents_on_element_id_and_position"
|
49
|
-
end
|
50
|
-
|
51
|
-
unless table_exists?('alchemy_elements')
|
52
|
-
create_table "alchemy_elements" do |t|
|
53
|
-
t.string "name"
|
54
|
-
t.integer "position"
|
55
|
-
t.integer "page_id"
|
56
|
-
t.boolean "public", default: true
|
57
|
-
t.boolean "folded", default: false
|
58
|
-
t.boolean "unique", default: false
|
59
|
-
t.datetime "created_at", null: false
|
60
|
-
t.datetime "updated_at", null: false
|
61
|
-
t.integer "creator_id"
|
62
|
-
t.integer "updater_id"
|
63
|
-
t.integer "cell_id"
|
64
|
-
t.text "cached_tag_list"
|
65
|
-
end
|
66
|
-
add_index "alchemy_elements", ["page_id", "position"], name: "index_elements_on_page_id_and_position"
|
67
|
-
end
|
68
|
-
|
69
|
-
unless table_exists?('alchemy_elements_alchemy_pages')
|
70
|
-
create_table "alchemy_elements_alchemy_pages", id: false do |t|
|
71
|
-
t.integer "element_id"
|
72
|
-
t.integer "page_id"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
unless table_exists?('alchemy_essence_booleans')
|
77
|
-
create_table "alchemy_essence_booleans" do |t|
|
78
|
-
t.boolean "value"
|
79
|
-
t.datetime "created_at", null: false
|
80
|
-
t.datetime "updated_at", null: false
|
81
|
-
t.integer "creator_id"
|
82
|
-
t.integer "updater_id"
|
83
|
-
end
|
84
|
-
add_index "alchemy_essence_booleans", ["value"], name: "index_alchemy_essence_booleans_on_value"
|
85
|
-
end
|
86
|
-
|
87
|
-
unless table_exists?('alchemy_essence_dates')
|
88
|
-
create_table "alchemy_essence_dates" do |t|
|
89
|
-
t.datetime "date"
|
90
|
-
t.integer "creator_id"
|
91
|
-
t.integer "updater_id"
|
92
|
-
t.datetime "created_at", null: false
|
93
|
-
t.datetime "updated_at", null: false
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
unless table_exists?('alchemy_essence_files')
|
98
|
-
create_table "alchemy_essence_files" do |t|
|
99
|
-
t.integer "attachment_id"
|
100
|
-
t.string "title"
|
101
|
-
t.string "css_class"
|
102
|
-
t.integer "creator_id"
|
103
|
-
t.integer "updater_id"
|
104
|
-
t.datetime "created_at", null: false
|
105
|
-
t.datetime "updated_at", null: false
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
unless table_exists?('alchemy_essence_htmls')
|
110
|
-
create_table "alchemy_essence_htmls" do |t|
|
111
|
-
t.text "source"
|
112
|
-
t.integer "creator_id"
|
113
|
-
t.integer "updater_id"
|
114
|
-
t.datetime "created_at", null: false
|
115
|
-
t.datetime "updated_at", null: false
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
unless table_exists?('alchemy_essence_links')
|
120
|
-
create_table "alchemy_essence_links" do |t|
|
121
|
-
t.string "link"
|
122
|
-
t.string "link_title"
|
123
|
-
t.string "link_target"
|
124
|
-
t.string "link_class_name"
|
125
|
-
t.datetime "created_at", null: false
|
126
|
-
t.datetime "updated_at", null: false
|
127
|
-
t.integer "creator_id"
|
128
|
-
t.integer "updater_id"
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
unless table_exists?('alchemy_essence_pictures')
|
133
|
-
create_table "alchemy_essence_pictures" do |t|
|
134
|
-
t.integer "picture_id"
|
135
|
-
t.string "caption"
|
136
|
-
t.string "title"
|
137
|
-
t.string "alt_tag"
|
138
|
-
t.string "link"
|
139
|
-
t.string "link_class_name"
|
140
|
-
t.string "link_title"
|
141
|
-
t.string "css_class"
|
142
|
-
t.string "link_target"
|
143
|
-
t.integer "creator_id"
|
144
|
-
t.integer "updater_id"
|
145
|
-
t.datetime "created_at", null: false
|
146
|
-
t.datetime "updated_at", null: false
|
147
|
-
t.string "crop_from"
|
148
|
-
t.string "crop_size"
|
149
|
-
t.string "render_size"
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
unless table_exists?('alchemy_essence_richtexts')
|
154
|
-
create_table "alchemy_essence_richtexts" do |t|
|
155
|
-
t.text "body"
|
156
|
-
t.text "stripped_body"
|
157
|
-
t.boolean "do_not_index", default: false
|
158
|
-
t.boolean "public"
|
159
|
-
t.integer "creator_id"
|
160
|
-
t.integer "updater_id"
|
161
|
-
t.datetime "created_at", null: false
|
162
|
-
t.datetime "updated_at", null: false
|
163
|
-
end
|
164
|
-
end
|
165
|
-
|
166
|
-
unless table_exists?('alchemy_essence_selects')
|
167
|
-
create_table "alchemy_essence_selects" do |t|
|
168
|
-
t.string "value"
|
169
|
-
t.datetime "created_at", null: false
|
170
|
-
t.datetime "updated_at", null: false
|
171
|
-
t.integer "creator_id"
|
172
|
-
t.integer "updater_id"
|
173
|
-
end
|
174
|
-
add_index "alchemy_essence_selects", ["value"], name: "index_alchemy_essence_selects_on_value"
|
175
|
-
end
|
176
|
-
|
177
|
-
unless table_exists?('alchemy_essence_texts')
|
178
|
-
create_table "alchemy_essence_texts" do |t|
|
179
|
-
t.text "body"
|
180
|
-
t.string "link"
|
181
|
-
t.string "link_title"
|
182
|
-
t.string "link_class_name"
|
183
|
-
t.boolean "public", default: false
|
184
|
-
t.boolean "do_not_index", default: false
|
185
|
-
t.string "link_target"
|
186
|
-
t.integer "creator_id"
|
187
|
-
t.integer "updater_id"
|
188
|
-
t.datetime "created_at", null: false
|
189
|
-
t.datetime "updated_at", null: false
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
unless table_exists?('alchemy_folded_pages')
|
194
|
-
create_table "alchemy_folded_pages" do |t|
|
195
|
-
t.integer "page_id"
|
196
|
-
t.integer "user_id"
|
197
|
-
t.boolean "folded", default: false
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
unless table_exists?('alchemy_languages')
|
202
|
-
create_table "alchemy_languages" do |t|
|
203
|
-
t.string "name"
|
204
|
-
t.string "language_code"
|
205
|
-
t.string "frontpage_name"
|
206
|
-
t.string "page_layout", default: "intro"
|
207
|
-
t.boolean "public", default: false
|
208
|
-
t.datetime "created_at", null: false
|
209
|
-
t.datetime "updated_at", null: false
|
210
|
-
t.integer "creator_id"
|
211
|
-
t.integer "updater_id"
|
212
|
-
t.boolean "default", default: false
|
213
|
-
t.string "country_code", default: "", null: false
|
214
|
-
t.integer "site_id"
|
215
|
-
end
|
216
|
-
add_index "alchemy_languages", ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
|
217
|
-
add_index "alchemy_languages", ["language_code"], name: "index_alchemy_languages_on_language_code"
|
218
|
-
add_index "alchemy_languages", ["site_id"], name: "index_alchemy_languages_on_site_id"
|
219
|
-
end
|
220
|
-
|
221
|
-
unless table_exists?('alchemy_legacy_page_urls')
|
222
|
-
create_table "alchemy_legacy_page_urls" do |t|
|
223
|
-
t.string "urlname", null: false
|
224
|
-
t.integer "page_id", null: false
|
225
|
-
t.datetime "created_at", null: false
|
226
|
-
t.datetime "updated_at", null: false
|
227
|
-
end
|
228
|
-
add_index "alchemy_legacy_page_urls", ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
|
229
|
-
end
|
230
|
-
|
231
|
-
unless table_exists?('alchemy_pages')
|
232
|
-
create_table "alchemy_pages" do |t|
|
233
|
-
t.string "name"
|
234
|
-
t.string "urlname"
|
235
|
-
t.string "title"
|
236
|
-
t.string "language_code"
|
237
|
-
t.boolean "language_root"
|
238
|
-
t.string "page_layout"
|
239
|
-
t.text "meta_keywords"
|
240
|
-
t.text "meta_description"
|
241
|
-
t.integer "lft"
|
242
|
-
t.integer "rgt"
|
243
|
-
t.integer "parent_id"
|
244
|
-
t.integer "depth"
|
245
|
-
t.boolean "visible", default: false
|
246
|
-
t.boolean "public", default: false
|
247
|
-
t.boolean "locked", default: false
|
248
|
-
t.integer "locked_by"
|
249
|
-
t.boolean "restricted", default: false
|
250
|
-
t.boolean "robot_index", default: true
|
251
|
-
t.boolean "robot_follow", default: true
|
252
|
-
t.boolean "sitemap", default: true
|
253
|
-
t.boolean "layoutpage", default: false
|
254
|
-
t.datetime "created_at", null: false
|
255
|
-
t.datetime "updated_at", null: false
|
256
|
-
t.integer "creator_id"
|
257
|
-
t.integer "updater_id"
|
258
|
-
t.integer "language_id"
|
259
|
-
t.text "cached_tag_list"
|
260
|
-
end
|
261
|
-
add_index "alchemy_pages", ["language_id"], name: "index_pages_on_language_id"
|
262
|
-
add_index "alchemy_pages", ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
|
263
|
-
add_index "alchemy_pages", ["urlname"], name: "index_pages_on_urlname"
|
264
|
-
end
|
265
|
-
|
266
|
-
unless table_exists?('alchemy_pictures')
|
267
|
-
create_table "alchemy_pictures" do |t|
|
268
|
-
t.string "name"
|
269
|
-
t.string "image_file_name"
|
270
|
-
t.integer "image_file_width"
|
271
|
-
t.integer "image_file_height"
|
272
|
-
t.datetime "created_at", null: false
|
273
|
-
t.datetime "updated_at", null: false
|
274
|
-
t.integer "creator_id"
|
275
|
-
t.integer "updater_id"
|
276
|
-
t.string "upload_hash"
|
277
|
-
t.text "cached_tag_list"
|
278
|
-
t.string "image_file_uid"
|
279
|
-
t.integer "image_file_size"
|
280
|
-
end
|
281
|
-
end
|
282
|
-
|
283
|
-
unless table_exists?('alchemy_sites')
|
284
|
-
create_table "alchemy_sites" do |t|
|
285
|
-
t.string "host"
|
286
|
-
t.string "name"
|
287
|
-
t.datetime "created_at", null: false
|
288
|
-
t.datetime "updated_at", null: false
|
289
|
-
t.boolean "public", default: false
|
290
|
-
t.text "aliases"
|
291
|
-
t.boolean "redirect_to_primary_host"
|
292
|
-
end
|
293
|
-
add_index "alchemy_sites", ["host", "public"], name: "alchemy_sites_public_hosts_idx"
|
294
|
-
add_index "alchemy_sites", ["host"], name: "index_alchemy_sites_on_host"
|
295
|
-
end
|
296
|
-
|
297
|
-
unless table_exists?('taggings')
|
298
|
-
create_table "taggings" do |t|
|
299
|
-
t.integer "tag_id"
|
300
|
-
t.integer "taggable_id"
|
301
|
-
t.string "taggable_type"
|
302
|
-
t.integer "tagger_id"
|
303
|
-
t.string "tagger_type"
|
304
|
-
t.string "context"
|
305
|
-
t.datetime "created_at"
|
306
|
-
end
|
307
|
-
add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id"
|
308
|
-
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
309
|
-
create_table "tags" do |t|
|
310
|
-
t.string "name"
|
311
|
-
end
|
312
|
-
end
|
313
|
-
end
|
314
|
-
|
315
|
-
def down
|
316
|
-
if table_exists?('alchemy_attachments')
|
317
|
-
drop_table "alchemy_attachments"
|
318
|
-
end
|
319
|
-
|
320
|
-
if table_exists?('alchemy_cells')
|
321
|
-
drop_table "alchemy_cells"
|
322
|
-
end
|
323
|
-
|
324
|
-
if table_exists?('alchemy_contents')
|
325
|
-
drop_table "alchemy_contents"
|
326
|
-
end
|
327
|
-
|
328
|
-
if table_exists?('alchemy_elements')
|
329
|
-
drop_table "alchemy_elements"
|
330
|
-
end
|
331
|
-
|
332
|
-
if table_exists?('alchemy_elements_alchemy_pages')
|
333
|
-
drop_table "alchemy_elements_alchemy_pages"
|
334
|
-
end
|
335
|
-
|
336
|
-
if table_exists?('alchemy_essence_booleans')
|
337
|
-
drop_table "alchemy_essence_booleans"
|
338
|
-
end
|
339
|
-
|
340
|
-
if table_exists?('alchemy_essence_dates')
|
341
|
-
drop_table "alchemy_essence_dates"
|
342
|
-
end
|
343
|
-
|
344
|
-
if table_exists?('alchemy_essence_files')
|
345
|
-
drop_table "alchemy_essence_files"
|
346
|
-
end
|
347
|
-
|
348
|
-
if table_exists?('alchemy_essence_htmls')
|
349
|
-
drop_table "alchemy_essence_htmls"
|
350
|
-
end
|
351
|
-
|
352
|
-
if table_exists?('alchemy_essence_links')
|
353
|
-
drop_table "alchemy_essence_links"
|
354
|
-
end
|
355
|
-
|
356
|
-
if table_exists?('alchemy_essence_pictures')
|
357
|
-
drop_table "alchemy_essence_pictures"
|
358
|
-
end
|
359
|
-
|
360
|
-
if table_exists?('alchemy_essence_richtexts')
|
361
|
-
drop_table "alchemy_essence_richtexts"
|
362
|
-
end
|
363
|
-
|
364
|
-
if table_exists?('alchemy_essence_selects')
|
365
|
-
drop_table "alchemy_essence_selects"
|
366
|
-
end
|
367
|
-
|
368
|
-
if table_exists?('alchemy_essence_texts')
|
369
|
-
drop_table "alchemy_essence_texts"
|
370
|
-
end
|
371
|
-
|
372
|
-
if table_exists?('alchemy_folded_pages')
|
373
|
-
drop_table "alchemy_folded_pages"
|
374
|
-
end
|
375
|
-
|
376
|
-
if table_exists?('alchemy_languages')
|
377
|
-
drop_table "alchemy_languages"
|
378
|
-
end
|
379
|
-
|
380
|
-
if table_exists?('alchemy_legacy_page_urls')
|
381
|
-
drop_table "alchemy_legacy_page_urls"
|
382
|
-
end
|
383
|
-
|
384
|
-
if table_exists?('alchemy_pages')
|
385
|
-
drop_table "alchemy_pages"
|
386
|
-
end
|
387
|
-
|
388
|
-
if table_exists?('alchemy_pictures')
|
389
|
-
drop_table "alchemy_pictures"
|
390
|
-
end
|
391
|
-
|
392
|
-
if table_exists?('alchemy_sites')
|
393
|
-
drop_table "alchemy_sites"
|
394
|
-
end
|
395
|
-
|
396
|
-
end
|
397
|
-
end
|