alchemy-devise 3.6.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -8
  3. data/Rakefile +8 -2
  4. data/app/models/alchemy/user.rb +2 -13
  5. data/db/migrate/20131015124700_create_alchemy_users.rb +1 -1
  6. data/db/migrate/20131225232042_add_alchemy_roles_to_alchemy_users.rb +1 -1
  7. data/db/migrate/20141209144532_add_indexes_to_alchemy_users.rb +1 -1
  8. data/lib/alchemy/devise.rb +35 -0
  9. data/lib/alchemy/devise/test_support/factories.rb +1 -1
  10. data/lib/alchemy/devise/version.rb +1 -1
  11. data/spec/controllers/admin/users_controller_spec.rb +29 -21
  12. data/spec/controllers/user_sessions_controller_spec.rb +21 -19
  13. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  14. data/spec/dummy/bin/rails +1 -5
  15. data/spec/dummy/bin/rake +0 -4
  16. data/spec/dummy/bin/rspec +0 -4
  17. data/spec/dummy/bin/setup +34 -0
  18. data/spec/dummy/bin/update +29 -0
  19. data/spec/dummy/config/application.rb +4 -14
  20. data/spec/dummy/config/boot.rb +3 -3
  21. data/spec/dummy/config/environment.rb +2 -2
  22. data/spec/dummy/config/environments/development.rb +24 -11
  23. data/spec/dummy/config/environments/production.rb +24 -17
  24. data/spec/dummy/config/environments/test.rb +6 -6
  25. data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
  26. data/spec/dummy/config/initializers/cookies_serializer.rb +2 -0
  27. data/spec/dummy/config/initializers/new_framework_defaults.rb +25 -0
  28. data/spec/dummy/config/initializers/session_store.rb +1 -1
  29. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
  30. data/spec/dummy/config/puma.rb +47 -0
  31. data/spec/dummy/config/routes.rb +1 -1
  32. data/spec/dummy/config/secrets.yml +3 -3
  33. data/spec/dummy/db/migrate/20131018201539_alchemy_two_point_six.alchemy.rb +1 -1
  34. data/spec/dummy/db/migrate/20131018201540_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb +1 -1
  35. data/spec/dummy/db/migrate/20131018201541_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb +1 -1
  36. data/spec/dummy/db/migrate/20141119205155_add_published_at_to_alchemy_pages.alchemy.rb +1 -1
  37. data/spec/dummy/db/migrate/20141119205156_add_missing_unique_indices_to_tags_and_taggings.alchemy.rb +1 -1
  38. data/spec/dummy/db/migrate/20141119205157_add_taggings_counter_cache_to_tags.alchemy.rb +2 -2
  39. data/spec/dummy/db/migrate/20141119205158_add_missing_taggable_index.alchemy.rb +1 -1
  40. data/spec/dummy/db/migrate/20160322214808_add_parent_element_id_to_alchemy_elements.alchemy.rb +1 -1
  41. data/spec/dummy/db/migrate/20160322214809_add_link_text_to_alchemy_essence_files.alchemy.rb +1 -1
  42. data/spec/dummy/db/migrate/20160518190421_add_locale_to_alchemy_languages.alchemy.rb +1 -1
  43. data/spec/dummy/db/migrate/20160518190425_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +1 -1
  44. data/spec/dummy/db/migrate/20160518190426_add_missing_unique_indices.acts_as_taggable_on_engine.rb +1 -1
  45. data/spec/dummy/db/migrate/20160518190427_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +1 -1
  46. data/spec/dummy/db/migrate/20160614164602_add_timebased_publishing_columns_to_pages.alchemy.rb +1 -1
  47. data/spec/dummy/db/migrate/20160614164603_add_image_file_format_to_alchemy_pictures.alchemy.rb +1 -1
  48. data/spec/dummy/db/migrate/20160627081901_change_alchemy_pages_locked_to_locked_at.alchemy.rb +1 -1
  49. data/spec/dummy/db/migrate/20161106124022_add_index_to_alchemy_pages_rgt.alchemy.rb +1 -1
  50. data/spec/dummy/db/migrate/20161106124023_add_foreign_key_indices_and_null_constraints.alchemy.rb +1 -1
  51. data/spec/dummy/db/migrate/20161106124024_add_foreign_keys.alchemy.rb +1 -1
  52. data/spec/dummy/db/migrate/20161106124026_add_missing_indexes.acts_as_taggable_on_engine.rb +1 -1
  53. data/spec/dummy/db/schema.rb +233 -250
  54. data/spec/requests/admin/users_controller_request_spec.rb +2 -2
  55. data/spec/spec_helper.rb +6 -2
  56. metadata +23 -18
  57. data/spec/dummy/bin/spring +0 -18
@@ -5,16 +5,16 @@
5
5
 
6
6
  # Make sure the secret is at least 30 characters and all random,
7
7
  # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
8
+ # You can use `rails secret` to generate a secure secret key.
9
9
 
10
10
  # Make sure the secrets in this file are kept private
11
11
  # if you're sharing your code publicly.
12
12
 
13
13
  development:
14
- secret_key_base: d0af432e7fcf8f5854bb03fc51ef0c8f4a1a7451914a220569682bf6cf96923c72af1434a11374091e5e95ab8883bdc856b13d80dafb30d23668d9244e058c73
14
+ secret_key_base: 1aadd3efcd27a3772eac3607400eba35431fc1eebfd9db42265ee857af58fb2a665f361d17d0949baf1fc0f343d236ddd99818a5d9bce1182488eda81a44f94a
15
15
 
16
16
  test:
17
- secret_key_base: e359d988baca5dcc85b6b2e5cd62a49948b5ce53744d867cef2dfeef46801c287c6f423678a601be2a47e99d94aa0cc5cd53708db2f21e6582e4d7f46ca812e4
17
+ secret_key_base: 763d24b544ba24c491eb39d687da11dd16ac69d7f450bad903a35890fbd0fdf4077c9259527d107ff388a78c130775b383fe1db8143e1f0579ed62a6b14dda5f
18
18
 
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
@@ -6,7 +6,7 @@
6
6
  # In order to upgrade from an old version of Alchemy, you have to run all migrations from
7
7
  # each version you missed up to the version you want to upgrade to, before running this migration.
8
8
  #
9
- class AlchemyTwoPointSix < ActiveRecord::Migration
9
+ class AlchemyTwoPointSix < ActiveRecord::Migration[4.2]
10
10
  def up
11
11
  # Do not run if Alchemy tables are already present
12
12
  return if table_exists?(:alchemy_pages)
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20130828121054)
2
- class RemoveDoNotIndexFromAlchemyEssenceTexts < ActiveRecord::Migration
2
+ class RemoveDoNotIndexFromAlchemyEssenceTexts < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  remove_column :alchemy_essence_texts, :do_not_index
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20130828121120)
2
- class RemoveDoNotIndexFromAlchemyEssenceRichtexts < ActiveRecord::Migration
2
+ class RemoveDoNotIndexFromAlchemyEssenceRichtexts < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  remove_column :alchemy_essence_richtexts, :do_not_index
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20130918201742)
2
- class AddPublishedAtToAlchemyPages < ActiveRecord::Migration
2
+ class AddPublishedAtToAlchemyPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :alchemy_pages, :published_at, :timestamp
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20140107192720)
2
- class AddMissingUniqueIndicesToTagsAndTaggings < ActiveRecord::Migration
2
+ class AddMissingUniqueIndicesToTagsAndTaggings < ActiveRecord::Migration[4.2]
3
3
 
4
4
  def self.up
5
5
  add_index :tags, :name, unique: true
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20140701160159)
2
- class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
2
+ class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]
3
3
  def self.up
4
4
  add_column :tags, :taggings_count, :integer, default: 0
5
5
 
@@ -12,4 +12,4 @@ class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
12
12
  def self.down
13
13
  remove_column :tags, :taggings_count
14
14
  end
15
- end
15
+ end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20140701160225)
2
- class AddMissingTaggableIndex < ActiveRecord::Migration
2
+ class AddMissingTaggableIndex < ActiveRecord::Migration[4.2]
3
3
  def self.up
4
4
  add_index :taggings, [:taggable_id, :taggable_type, :context]
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20150608204610)
2
- class AddParentElementIdToAlchemyElements < ActiveRecord::Migration
2
+ class AddParentElementIdToAlchemyElements < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :alchemy_elements, :parent_element_id, :integer
5
5
  add_index :alchemy_elements, [:page_id, :parent_element_id]
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20150729151825)
2
- class AddLinkTextToAlchemyEssenceFiles < ActiveRecord::Migration
2
+ class AddLinkTextToAlchemyEssenceFiles < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :alchemy_essence_files, :link_text, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20150906195818)
2
- class AddLocaleToAlchemyLanguages < ActiveRecord::Migration
2
+ class AddLocaleToAlchemyLanguages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :alchemy_languages, :locale, :string
5
5
  execute \
@@ -1,5 +1,5 @@
1
1
  # This migration comes from acts_as_taggable_on_engine (originally 1)
2
- class ActsAsTaggableOnMigration < ActiveRecord::Migration
2
+ class ActsAsTaggableOnMigration < ActiveRecord::Migration[4.2]
3
3
  def self.up
4
4
  # inserted by Alchemy CMS upgrader
5
5
  return if table_exists?(:tags)
@@ -1,5 +1,5 @@
1
1
  # This migration comes from acts_as_taggable_on_engine (originally 2)
2
- class AddMissingUniqueIndices < ActiveRecord::Migration
2
+ class AddMissingUniqueIndices < ActiveRecord::Migration[4.2]
3
3
  def self.up
4
4
  # inserted by Alchemy CMS upgrader
5
5
  return if index_exists?(:tags, :name)
@@ -1,7 +1,7 @@
1
1
  # This migration comes from acts_as_taggable_on_engine (originally 5)
2
2
  # This migration is added to circumvent issue #623 and have special characters
3
3
  # work properly
4
- class ChangeCollationForTagNames < ActiveRecord::Migration
4
+ class ChangeCollationForTagNames < ActiveRecord::Migration[4.2]
5
5
  def up
6
6
  if ActsAsTaggableOn::Utils.using_mysql?
7
7
  execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20160108174834)
2
- class AddTimebasedPublishingColumnsToPages < ActiveRecord::Migration
2
+ class AddTimebasedPublishingColumnsToPages < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  add_column :alchemy_pages, :public_on, :datetime
5
5
  add_column :alchemy_pages, :public_until, :datetime
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20160422195310)
2
- class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration
2
+ class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  add_column :alchemy_pictures, :image_file_format, :string
5
5
 
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20160617224938)
2
- class ChangeAlchemyPagesLockedToLockedAt < ActiveRecord::Migration
2
+ class ChangeAlchemyPagesLockedToLockedAt < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  add_column :alchemy_pages, :locked_at, :datetime
5
5
  update <<-SQL.strip_heredoc
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20160912223112)
2
- class AddIndexToAlchemyPagesRgt < ActiveRecord::Migration
2
+ class AddIndexToAlchemyPagesRgt < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  add_index :alchemy_pages, :rgt
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20160927205604)
2
- class AddForeignKeyIndicesAndNullConstraints < ActiveRecord::Migration
2
+ class AddForeignKeyIndicesAndNullConstraints < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  change_column_null :alchemy_cells, :page_id, false, 0
5
5
  change_column_null :alchemy_contents, :element_id, false, 0
@@ -1,5 +1,5 @@
1
1
  # This migration comes from alchemy (originally 20160928080104)
2
- class AddForeignKeys < ActiveRecord::Migration
2
+ class AddForeignKeys < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_foreign_key :alchemy_cells, :alchemy_pages,
5
5
  column: :page_id,
@@ -1,5 +1,5 @@
1
1
  # This migration comes from acts_as_taggable_on_engine (originally 6)
2
- class AddMissingIndexes < ActiveRecord::Migration
2
+ class AddMissingIndexes < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_index :taggings, :tag_id
5
5
  add_index :taggings, :taggable_id
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -14,356 +13,340 @@
14
13
  ActiveRecord::Schema.define(version: 20161106124026) do
15
14
 
16
15
  create_table "alchemy_attachments", force: :cascade do |t|
17
- t.string "name"
18
- t.string "file_name"
19
- t.string "file_mime_type"
20
- t.integer "file_size"
21
- t.integer "creator_id"
22
- t.integer "updater_id"
23
- t.datetime "created_at", null: false
24
- t.datetime "updated_at", null: false
25
- t.text "cached_tag_list"
26
- t.string "file_uid"
16
+ t.string "name"
17
+ t.string "file_name"
18
+ t.string "file_mime_type"
19
+ t.integer "file_size"
20
+ t.integer "creator_id"
21
+ t.integer "updater_id"
22
+ t.datetime "created_at", null: false
23
+ t.datetime "updated_at", null: false
24
+ t.text "cached_tag_list"
25
+ t.string "file_uid"
26
+ t.index ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
27
27
  end
28
28
 
29
- add_index "alchemy_attachments", ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
30
-
31
29
  create_table "alchemy_cells", force: :cascade do |t|
32
- t.integer "page_id", null: false
33
- t.string "name"
30
+ t.integer "page_id", null: false
31
+ t.string "name"
34
32
  t.datetime "created_at", null: false
35
33
  t.datetime "updated_at", null: false
34
+ t.index ["page_id"], name: "index_alchemy_cells_on_page_id"
36
35
  end
37
36
 
38
- add_index "alchemy_cells", ["page_id"], name: "index_alchemy_cells_on_page_id"
39
-
40
37
  create_table "alchemy_contents", force: :cascade do |t|
41
- t.string "name"
42
- t.string "essence_type", null: false
43
- t.integer "essence_id", null: false
44
- t.integer "element_id", null: false
45
- t.integer "position"
46
- t.datetime "created_at", null: false
47
- t.datetime "updated_at", null: false
48
- t.integer "creator_id"
49
- t.integer "updater_id"
38
+ t.string "name"
39
+ t.string "essence_type", null: false
40
+ t.integer "essence_id", null: false
41
+ t.integer "element_id", null: false
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
+ t.index ["element_id", "position"], name: "index_contents_on_element_id_and_position"
48
+ t.index ["essence_id", "essence_type"], name: "index_alchemy_contents_on_essence_id_and_essence_type", unique: true
50
49
  end
51
50
 
52
- add_index "alchemy_contents", ["element_id", "position"], name: "index_contents_on_element_id_and_position"
53
- add_index "alchemy_contents", ["essence_id", "essence_type"], name: "index_alchemy_contents_on_essence_id_and_essence_type", unique: true
54
-
55
51
  create_table "alchemy_elements", force: :cascade do |t|
56
- t.string "name"
57
- t.integer "position"
58
- t.integer "page_id", null: false
59
- t.boolean "public", default: true
60
- t.boolean "folded", default: false
61
- t.boolean "unique", default: false
62
- t.datetime "created_at", null: false
63
- t.datetime "updated_at", null: false
64
- t.integer "creator_id"
65
- t.integer "updater_id"
66
- t.integer "cell_id"
67
- t.text "cached_tag_list"
68
- t.integer "parent_element_id"
52
+ t.string "name"
53
+ t.integer "position"
54
+ t.integer "page_id", null: false
55
+ t.boolean "public", default: true
56
+ t.boolean "folded", default: false
57
+ t.boolean "unique", default: false
58
+ t.datetime "created_at", null: false
59
+ t.datetime "updated_at", null: false
60
+ t.integer "creator_id"
61
+ t.integer "updater_id"
62
+ t.integer "cell_id"
63
+ t.text "cached_tag_list"
64
+ t.integer "parent_element_id"
65
+ t.index ["cell_id"], name: "index_alchemy_elements_on_cell_id"
66
+ t.index ["page_id", "parent_element_id"], name: "index_alchemy_elements_on_page_id_and_parent_element_id"
67
+ t.index ["page_id", "position"], name: "index_elements_on_page_id_and_position"
69
68
  end
70
69
 
71
- add_index "alchemy_elements", ["cell_id"], name: "index_alchemy_elements_on_cell_id"
72
- add_index "alchemy_elements", ["page_id", "parent_element_id"], name: "index_alchemy_elements_on_page_id_and_parent_element_id"
73
- add_index "alchemy_elements", ["page_id", "position"], name: "index_elements_on_page_id_and_position"
74
-
75
70
  create_table "alchemy_elements_alchemy_pages", id: false, force: :cascade do |t|
76
71
  t.integer "element_id"
77
72
  t.integer "page_id"
78
73
  end
79
74
 
80
75
  create_table "alchemy_essence_booleans", force: :cascade do |t|
81
- t.boolean "value"
76
+ t.boolean "value"
82
77
  t.datetime "created_at", null: false
83
78
  t.datetime "updated_at", null: false
84
- t.integer "creator_id"
85
- t.integer "updater_id"
79
+ t.integer "creator_id"
80
+ t.integer "updater_id"
81
+ t.index ["value"], name: "index_alchemy_essence_booleans_on_value"
86
82
  end
87
83
 
88
- add_index "alchemy_essence_booleans", ["value"], name: "index_alchemy_essence_booleans_on_value"
89
-
90
84
  create_table "alchemy_essence_dates", force: :cascade do |t|
91
85
  t.datetime "date"
92
- t.integer "creator_id"
93
- t.integer "updater_id"
86
+ t.integer "creator_id"
87
+ t.integer "updater_id"
94
88
  t.datetime "created_at", null: false
95
89
  t.datetime "updated_at", null: false
96
90
  end
97
91
 
98
92
  create_table "alchemy_essence_files", force: :cascade 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
- t.string "link_text"
93
+ t.integer "attachment_id"
94
+ t.string "title"
95
+ t.string "css_class"
96
+ t.integer "creator_id"
97
+ t.integer "updater_id"
98
+ t.datetime "created_at", null: false
99
+ t.datetime "updated_at", null: false
100
+ t.string "link_text"
101
+ t.index ["attachment_id"], name: "index_alchemy_essence_files_on_attachment_id"
107
102
  end
108
103
 
109
- add_index "alchemy_essence_files", ["attachment_id"], name: "index_alchemy_essence_files_on_attachment_id"
110
-
111
104
  create_table "alchemy_essence_htmls", force: :cascade do |t|
112
- t.text "source"
113
- t.integer "creator_id"
114
- t.integer "updater_id"
105
+ t.text "source"
106
+ t.integer "creator_id"
107
+ t.integer "updater_id"
115
108
  t.datetime "created_at", null: false
116
109
  t.datetime "updated_at", null: false
117
110
  end
118
111
 
119
112
  create_table "alchemy_essence_links", force: :cascade do |t|
120
- t.string "link"
121
- t.string "link_title"
122
- t.string "link_target"
123
- t.string "link_class_name"
124
- t.datetime "created_at", null: false
125
- t.datetime "updated_at", null: false
126
- t.integer "creator_id"
127
- t.integer "updater_id"
113
+ t.string "link"
114
+ t.string "link_title"
115
+ t.string "link_target"
116
+ t.string "link_class_name"
117
+ t.datetime "created_at", null: false
118
+ t.datetime "updated_at", null: false
119
+ t.integer "creator_id"
120
+ t.integer "updater_id"
128
121
  end
129
122
 
130
123
  create_table "alchemy_essence_pictures", force: :cascade do |t|
131
- t.integer "picture_id"
132
- t.string "caption"
133
- t.string "title"
134
- t.string "alt_tag"
135
- t.string "link"
136
- t.string "link_class_name"
137
- t.string "link_title"
138
- t.string "css_class"
139
- t.string "link_target"
140
- t.integer "creator_id"
141
- t.integer "updater_id"
142
- t.datetime "created_at", null: false
143
- t.datetime "updated_at", null: false
144
- t.string "crop_from"
145
- t.string "crop_size"
146
- t.string "render_size"
124
+ t.integer "picture_id"
125
+ t.string "caption"
126
+ t.string "title"
127
+ t.string "alt_tag"
128
+ t.string "link"
129
+ t.string "link_class_name"
130
+ t.string "link_title"
131
+ t.string "css_class"
132
+ t.string "link_target"
133
+ t.integer "creator_id"
134
+ t.integer "updater_id"
135
+ t.datetime "created_at", null: false
136
+ t.datetime "updated_at", null: false
137
+ t.string "crop_from"
138
+ t.string "crop_size"
139
+ t.string "render_size"
140
+ t.index ["picture_id"], name: "index_alchemy_essence_pictures_on_picture_id"
147
141
  end
148
142
 
149
- add_index "alchemy_essence_pictures", ["picture_id"], name: "index_alchemy_essence_pictures_on_picture_id"
150
-
151
143
  create_table "alchemy_essence_richtexts", force: :cascade do |t|
152
- t.text "body"
153
- t.text "stripped_body"
154
- t.boolean "public"
155
- t.integer "creator_id"
156
- t.integer "updater_id"
157
- t.datetime "created_at", null: false
158
- t.datetime "updated_at", null: false
144
+ t.text "body"
145
+ t.text "stripped_body"
146
+ t.boolean "public"
147
+ t.integer "creator_id"
148
+ t.integer "updater_id"
149
+ t.datetime "created_at", null: false
150
+ t.datetime "updated_at", null: false
159
151
  end
160
152
 
161
153
  create_table "alchemy_essence_selects", force: :cascade do |t|
162
- t.string "value"
154
+ t.string "value"
163
155
  t.datetime "created_at", null: false
164
156
  t.datetime "updated_at", null: false
165
- t.integer "creator_id"
166
- t.integer "updater_id"
157
+ t.integer "creator_id"
158
+ t.integer "updater_id"
159
+ t.index ["value"], name: "index_alchemy_essence_selects_on_value"
167
160
  end
168
161
 
169
- add_index "alchemy_essence_selects", ["value"], name: "index_alchemy_essence_selects_on_value"
170
-
171
162
  create_table "alchemy_essence_texts", force: :cascade do |t|
172
- t.text "body"
173
- t.string "link"
174
- t.string "link_title"
175
- t.string "link_class_name"
176
- t.boolean "public", default: false
177
- t.string "link_target"
178
- t.integer "creator_id"
179
- t.integer "updater_id"
180
- t.datetime "created_at", null: false
181
- t.datetime "updated_at", null: false
163
+ t.text "body"
164
+ t.string "link"
165
+ t.string "link_title"
166
+ t.string "link_class_name"
167
+ t.boolean "public", default: false
168
+ t.string "link_target"
169
+ t.integer "creator_id"
170
+ t.integer "updater_id"
171
+ t.datetime "created_at", null: false
172
+ t.datetime "updated_at", null: false
182
173
  end
183
174
 
184
175
  create_table "alchemy_folded_pages", force: :cascade do |t|
185
- t.integer "page_id", null: false
186
- t.integer "user_id", null: false
187
- t.boolean "folded", default: false
176
+ t.integer "page_id", null: false
177
+ t.integer "user_id", null: false
178
+ t.boolean "folded", default: false
179
+ t.index ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true
188
180
  end
189
181
 
190
- add_index "alchemy_folded_pages", ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true
191
-
192
182
  create_table "alchemy_languages", force: :cascade do |t|
193
- t.string "name"
194
- t.string "language_code"
195
- t.string "frontpage_name"
196
- t.string "page_layout", default: "intro"
197
- t.boolean "public", default: false
198
- t.datetime "created_at", null: false
199
- t.datetime "updated_at", null: false
200
- t.integer "creator_id"
201
- t.integer "updater_id"
202
- t.boolean "default", default: false
203
- t.string "country_code", default: "", null: false
204
- t.integer "site_id", null: false
205
- t.string "locale"
183
+ t.string "name"
184
+ t.string "language_code"
185
+ t.string "frontpage_name"
186
+ t.string "page_layout", default: "intro"
187
+ t.boolean "public", default: false
188
+ t.datetime "created_at", null: false
189
+ t.datetime "updated_at", null: false
190
+ t.integer "creator_id"
191
+ t.integer "updater_id"
192
+ t.boolean "default", default: false
193
+ t.string "country_code", default: "", null: false
194
+ t.integer "site_id", null: false
195
+ t.string "locale"
196
+ t.index ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
197
+ t.index ["language_code"], name: "index_alchemy_languages_on_language_code"
198
+ t.index ["site_id"], name: "index_alchemy_languages_on_site_id"
206
199
  end
207
200
 
208
- add_index "alchemy_languages", ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
209
- add_index "alchemy_languages", ["language_code"], name: "index_alchemy_languages_on_language_code"
210
- add_index "alchemy_languages", ["site_id"], name: "index_alchemy_languages_on_site_id"
211
-
212
201
  create_table "alchemy_legacy_page_urls", force: :cascade do |t|
213
- t.string "urlname", null: false
214
- t.integer "page_id", null: false
202
+ t.string "urlname", null: false
203
+ t.integer "page_id", null: false
215
204
  t.datetime "created_at", null: false
216
205
  t.datetime "updated_at", null: false
206
+ t.index ["page_id"], name: "index_alchemy_legacy_page_urls_on_page_id"
207
+ t.index ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
217
208
  end
218
209
 
219
- add_index "alchemy_legacy_page_urls", ["page_id"], name: "index_alchemy_legacy_page_urls_on_page_id"
220
- add_index "alchemy_legacy_page_urls", ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
221
-
222
210
  create_table "alchemy_pages", force: :cascade do |t|
223
- t.string "name"
224
- t.string "urlname"
225
- t.string "title"
226
- t.string "language_code"
227
- t.boolean "language_root"
228
- t.string "page_layout"
229
- t.text "meta_keywords"
230
- t.text "meta_description"
231
- t.integer "lft"
232
- t.integer "rgt"
233
- t.integer "parent_id"
234
- t.integer "depth"
235
- t.boolean "visible", default: false
236
- t.integer "locked_by"
237
- t.boolean "restricted", default: false
238
- t.boolean "robot_index", default: true
239
- t.boolean "robot_follow", default: true
240
- t.boolean "sitemap", default: true
241
- t.boolean "layoutpage", default: false
242
- t.datetime "created_at", null: false
243
- t.datetime "updated_at", null: false
244
- t.integer "creator_id"
245
- t.integer "updater_id"
246
- t.integer "language_id"
247
- t.text "cached_tag_list"
211
+ t.string "name"
212
+ t.string "urlname"
213
+ t.string "title"
214
+ t.string "language_code"
215
+ t.boolean "language_root"
216
+ t.string "page_layout"
217
+ t.text "meta_keywords"
218
+ t.text "meta_description"
219
+ t.integer "lft"
220
+ t.integer "rgt"
221
+ t.integer "parent_id"
222
+ t.integer "depth"
223
+ t.boolean "visible", default: false
224
+ t.integer "locked_by"
225
+ t.boolean "restricted", default: false
226
+ t.boolean "robot_index", default: true
227
+ t.boolean "robot_follow", default: true
228
+ t.boolean "sitemap", default: true
229
+ t.boolean "layoutpage", default: false
230
+ t.datetime "created_at", null: false
231
+ t.datetime "updated_at", null: false
232
+ t.integer "creator_id"
233
+ t.integer "updater_id"
234
+ t.integer "language_id"
235
+ t.text "cached_tag_list"
248
236
  t.datetime "published_at"
249
237
  t.datetime "public_on"
250
238
  t.datetime "public_until"
251
239
  t.datetime "locked_at"
240
+ t.index ["language_id"], name: "index_pages_on_language_id"
241
+ t.index ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by"
242
+ t.index ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
243
+ t.index ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until"
244
+ t.index ["rgt"], name: "index_alchemy_pages_on_rgt"
245
+ t.index ["urlname"], name: "index_pages_on_urlname"
252
246
  end
253
247
 
254
- add_index "alchemy_pages", ["language_id"], name: "index_pages_on_language_id"
255
- add_index "alchemy_pages", ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by"
256
- add_index "alchemy_pages", ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
257
- add_index "alchemy_pages", ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until"
258
- add_index "alchemy_pages", ["rgt"], name: "index_alchemy_pages_on_rgt"
259
- add_index "alchemy_pages", ["urlname"], name: "index_pages_on_urlname"
260
-
261
248
  create_table "alchemy_pictures", force: :cascade do |t|
262
- t.string "name"
263
- t.string "image_file_name"
264
- t.integer "image_file_width"
265
- t.integer "image_file_height"
266
- t.datetime "created_at", null: false
267
- t.datetime "updated_at", null: false
268
- t.integer "creator_id"
269
- t.integer "updater_id"
270
- t.string "upload_hash"
271
- t.text "cached_tag_list"
272
- t.string "image_file_uid"
273
- t.integer "image_file_size"
274
- t.string "image_file_format"
249
+ t.string "name"
250
+ t.string "image_file_name"
251
+ t.integer "image_file_width"
252
+ t.integer "image_file_height"
253
+ t.datetime "created_at", null: false
254
+ t.datetime "updated_at", null: false
255
+ t.integer "creator_id"
256
+ t.integer "updater_id"
257
+ t.string "upload_hash"
258
+ t.text "cached_tag_list"
259
+ t.string "image_file_uid"
260
+ t.integer "image_file_size"
261
+ t.string "image_file_format"
275
262
  end
276
263
 
277
264
  create_table "alchemy_sites", force: :cascade do |t|
278
- t.string "host"
279
- t.string "name"
280
- t.datetime "created_at", null: false
281
- t.datetime "updated_at", null: false
282
- t.boolean "public", default: false
283
- t.text "aliases"
284
- t.boolean "redirect_to_primary_host"
265
+ t.string "host"
266
+ t.string "name"
267
+ t.datetime "created_at", null: false
268
+ t.datetime "updated_at", null: false
269
+ t.boolean "public", default: false
270
+ t.text "aliases"
271
+ t.boolean "redirect_to_primary_host"
272
+ t.index ["host", "public"], name: "alchemy_sites_public_hosts_idx"
273
+ t.index ["host"], name: "index_alchemy_sites_on_host"
285
274
  end
286
275
 
287
- add_index "alchemy_sites", ["host", "public"], name: "alchemy_sites_public_hosts_idx"
288
- add_index "alchemy_sites", ["host"], name: "index_alchemy_sites_on_host"
289
-
290
276
  create_table "alchemy_users", force: :cascade do |t|
291
- t.string "firstname"
292
- t.string "lastname"
293
- t.string "login"
294
- t.string "email"
295
- t.string "gender"
296
- t.string "language"
297
- t.string "encrypted_password", limit: 128, default: "", null: false
298
- t.string "password_salt", limit: 128, default: "", null: false
299
- t.integer "sign_in_count", default: 0, null: false
300
- t.integer "failed_attempts", default: 0, null: false
277
+ t.string "firstname"
278
+ t.string "lastname"
279
+ t.string "login"
280
+ t.string "email"
281
+ t.string "gender"
282
+ t.string "language"
283
+ t.string "encrypted_password", limit: 128, default: "", null: false
284
+ t.string "password_salt", limit: 128, default: "", null: false
285
+ t.integer "sign_in_count", default: 0, null: false
286
+ t.integer "failed_attempts", default: 0, null: false
301
287
  t.datetime "last_request_at"
302
288
  t.datetime "current_sign_in_at"
303
289
  t.datetime "last_sign_in_at"
304
- t.string "current_sign_in_ip"
305
- t.string "last_sign_in_ip"
306
- t.datetime "created_at", null: false
307
- t.datetime "updated_at", null: false
308
- t.integer "creator_id"
309
- t.integer "updater_id"
310
- t.text "cached_tag_list"
311
- t.string "reset_password_token"
290
+ t.string "current_sign_in_ip"
291
+ t.string "last_sign_in_ip"
292
+ t.datetime "created_at", null: false
293
+ t.datetime "updated_at", null: false
294
+ t.integer "creator_id"
295
+ t.integer "updater_id"
296
+ t.text "cached_tag_list"
297
+ t.string "reset_password_token"
312
298
  t.datetime "reset_password_sent_at"
313
- t.string "alchemy_roles", default: "member"
299
+ t.string "alchemy_roles", default: "member"
300
+ t.index ["alchemy_roles"], name: "index_alchemy_users_on_alchemy_roles"
301
+ t.index ["email"], name: "index_alchemy_users_on_email", unique: true
302
+ t.index ["firstname"], name: "index_alchemy_users_on_firstname"
303
+ t.index ["lastname"], name: "index_alchemy_users_on_lastname"
304
+ t.index ["login"], name: "index_alchemy_users_on_login", unique: true
305
+ t.index ["reset_password_token"], name: "index_alchemy_users_on_reset_password_token", unique: true
314
306
  end
315
307
 
316
- add_index "alchemy_users", ["alchemy_roles"], name: "index_alchemy_users_on_alchemy_roles"
317
- add_index "alchemy_users", ["email"], name: "index_alchemy_users_on_email", unique: true
318
- add_index "alchemy_users", ["firstname"], name: "index_alchemy_users_on_firstname"
319
- add_index "alchemy_users", ["lastname"], name: "index_alchemy_users_on_lastname"
320
- add_index "alchemy_users", ["login"], name: "index_alchemy_users_on_login", unique: true
321
- add_index "alchemy_users", ["reset_password_token"], name: "index_alchemy_users_on_reset_password_token", unique: true
322
-
323
308
  create_table "events", force: :cascade do |t|
324
- t.string "name"
325
- t.string "hidden_name"
309
+ t.string "name"
310
+ t.string "hidden_name"
326
311
  t.datetime "starts_at"
327
312
  t.datetime "ends_at"
328
- t.text "description"
329
- t.decimal "entrance_fee", precision: 6, scale: 2
330
- t.boolean "published"
331
- t.integer "location_id"
332
- t.datetime "created_at", null: false
333
- t.datetime "updated_at", null: false
313
+ t.text "description"
314
+ t.decimal "entrance_fee", precision: 6, scale: 2
315
+ t.boolean "published"
316
+ t.integer "location_id"
317
+ t.datetime "created_at", null: false
318
+ t.datetime "updated_at", null: false
334
319
  end
335
320
 
336
321
  create_table "locations", force: :cascade do |t|
337
- t.string "name"
322
+ t.string "name"
338
323
  t.datetime "created_at", null: false
339
324
  t.datetime "updated_at", null: false
340
325
  end
341
326
 
342
327
  create_table "taggings", force: :cascade do |t|
343
- t.integer "tag_id"
344
- t.integer "taggable_id"
345
- t.string "taggable_type"
346
- t.integer "tagger_id"
347
- t.string "tagger_type"
348
- t.string "context"
328
+ t.integer "tag_id"
329
+ t.integer "taggable_id"
330
+ t.string "taggable_type"
331
+ t.integer "tagger_id"
332
+ t.string "tagger_type"
333
+ t.string "context"
349
334
  t.datetime "created_at"
335
+ t.index ["context"], name: "index_taggings_on_context"
336
+ t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
337
+ t.index ["tag_id"], name: "index_taggings_on_tag_id"
338
+ t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
339
+ t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
340
+ t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
341
+ t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
342
+ t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
343
+ t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
350
344
  end
351
345
 
352
- add_index "taggings", ["context"], name: "index_taggings_on_context"
353
- add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
354
- add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id"
355
- add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
356
- add_index "taggings", ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
357
- add_index "taggings", ["taggable_id"], name: "index_taggings_on_taggable_id"
358
- add_index "taggings", ["taggable_type"], name: "index_taggings_on_taggable_type"
359
- add_index "taggings", ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
360
- add_index "taggings", ["tagger_id"], name: "index_taggings_on_tagger_id"
361
-
362
346
  create_table "tags", force: :cascade do |t|
363
- t.string "name"
347
+ t.string "name"
364
348
  t.integer "taggings_count", default: 0
349
+ t.index ["name"], name: "index_tags_on_name", unique: true
365
350
  end
366
351
 
367
- add_index "tags", ["name"], name: "index_tags_on_name", unique: true
368
-
369
352
  end