alchemy_kono_mailup 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +26 -0
  5. data/app/assets/images/alchemy_kono_mailup/.keep +0 -0
  6. data/app/assets/javascripts/alchemy_kono_mailup/application.js +13 -0
  7. data/app/assets/stylesheets/alchemy_kono_mailup/application.css +15 -0
  8. data/app/controllers/alchemy/admin/essence_mailup_lists_controller.rb +22 -0
  9. data/app/controllers/alchemy_kono_mailup/admin/base_controller.rb +5 -0
  10. data/app/controllers/alchemy_kono_mailup/admin/mailup_configs_controller.rb +13 -0
  11. data/app/controllers/alchemy_kono_mailup/admin/tokens_controller.rb +16 -0
  12. data/app/helpers/alchemy_kono_mailup/application_helper.rb +22 -0
  13. data/app/models/alchemy/essence_mailup_list.rb +4 -0
  14. data/app/models/alchemy_kono_mailup/base_subscription_form.rb +11 -0
  15. data/app/models/alchemy_kono_mailup/mailup_config.rb +6 -0
  16. data/app/views/alchemy/essences/_essence_mailup_list_editor.html.erb +11 -0
  17. data/app/views/alchemy/essences/_essence_mailup_list_view.html.erb +3 -0
  18. data/app/views/alchemy_kono_mailup/admin/mailup_configs/main.html.erb +19 -0
  19. data/app/views/layouts/alchemy_kono_mailup/application.html.erb +14 -0
  20. data/config/initializers/alchemy.rb +26 -0
  21. data/config/initializers/kono_mailup.rb +9 -0
  22. data/config/routes.rb +21 -0
  23. data/db/migrate/20171127105007_create_alchemy_kono_mailup_alchemy_essence_mailup_lists.rb +13 -0
  24. data/lib/alchemy_kono_mailup.rb +21 -0
  25. data/lib/alchemy_kono_mailup/ability.rb +58 -0
  26. data/lib/alchemy_kono_mailup/engine.rb +22 -0
  27. data/lib/alchemy_kono_mailup/version.rb +3 -0
  28. data/lib/generators/alchemy_kono_mailup/install/USAGE +9 -0
  29. data/lib/generators/alchemy_kono_mailup/install/install_generator.rb +20 -0
  30. data/lib/generators/alchemy_kono_mailup/install/templates/initializers.rb +4 -0
  31. data/lib/generators/alchemy_kono_mailup/subscription_form/USAGE +7 -0
  32. data/lib/generators/alchemy_kono_mailup/subscription_form/subscription_form_generator.rb +75 -0
  33. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_controller.rb.erb +70 -0
  34. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_model.rb.erb +5 -0
  35. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_view.html.erb +29 -0
  36. data/lib/tasks/alchemy_kono_mailup_tasks.rake +4 -0
  37. data/spec/dummy/README.rdoc +28 -0
  38. data/spec/dummy/Rakefile +6 -0
  39. data/spec/dummy/app/assets/images/.keep +0 -0
  40. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  41. data/spec/dummy/app/assets/stylesheets/alchemy/elements/article.scss +30 -0
  42. data/spec/dummy/app/assets/stylesheets/application.css +16 -0
  43. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  44. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  45. data/spec/dummy/app/controllers/mailup_subscription_forms_controller.rb +73 -0
  46. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  47. data/spec/dummy/app/mailers/.keep +0 -0
  48. data/spec/dummy/app/models/.keep +0 -0
  49. data/spec/dummy/app/models/concerns/.keep +0 -0
  50. data/spec/dummy/app/models/mailup_subscription_form.rb +7 -0
  51. data/spec/dummy/app/views/alchemy/elements/_article_editor.html.erb +5 -0
  52. data/spec/dummy/app/views/alchemy/elements/_article_view.html.erb +7 -0
  53. data/spec/dummy/app/views/alchemy/elements/_mailup_subscription_editor.html.erb +3 -0
  54. data/spec/dummy/app/views/alchemy/elements/_mailup_subscription_view.html.erb +27 -0
  55. data/spec/dummy/app/views/alchemy/page_layouts/_standard.html.erb +1 -0
  56. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  57. data/spec/dummy/bin/bundle +3 -0
  58. data/spec/dummy/bin/rails +4 -0
  59. data/spec/dummy/bin/rake +4 -0
  60. data/spec/dummy/bin/setup +29 -0
  61. data/spec/dummy/config.ru +4 -0
  62. data/spec/dummy/config/alchemy/config.yml +194 -0
  63. data/spec/dummy/config/alchemy/elements.yml +27 -0
  64. data/spec/dummy/config/alchemy/page_layouts.yml +8 -0
  65. data/spec/dummy/config/application.rb +32 -0
  66. data/spec/dummy/config/boot.rb +5 -0
  67. data/spec/dummy/config/database.yml +25 -0
  68. data/spec/dummy/config/environment.rb +5 -0
  69. data/spec/dummy/config/environments/development.rb +41 -0
  70. data/spec/dummy/config/environments/production.rb +79 -0
  71. data/spec/dummy/config/environments/test.rb +42 -0
  72. data/spec/dummy/config/initializers/assets.rb +11 -0
  73. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  74. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  75. data/spec/dummy/config/initializers/devise.rb +265 -0
  76. data/spec/dummy/config/initializers/dragonfly.rb +35 -0
  77. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  78. data/spec/dummy/config/initializers/inflections.rb +16 -0
  79. data/spec/dummy/config/initializers/kono_mailup.rb +13 -0
  80. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  81. data/spec/dummy/config/initializers/session_store.rb +3 -0
  82. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  83. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  84. data/spec/dummy/config/locales/alchemy.de.yml +31 -0
  85. data/spec/dummy/config/locales/alchemy.en.yml +31 -0
  86. data/spec/dummy/config/locales/alchemy.es.yml +31 -0
  87. data/spec/dummy/config/locales/en.yml +23 -0
  88. data/spec/dummy/config/routes.rb +9 -0
  89. data/spec/dummy/config/secrets_example.yml +24 -0
  90. data/spec/dummy/db/migrate/20171124145455_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +36 -0
  91. data/spec/dummy/db/migrate/20171124145456_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
  92. data/spec/dummy/db/migrate/20171124145457_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
  93. data/spec/dummy/db/migrate/20171124145458_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
  94. data/spec/dummy/db/migrate/20171124145459_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
  95. data/spec/dummy/db/migrate/20171124145460_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
  96. data/spec/dummy/db/migrate/20171124145461_alchemy_two_point_six.alchemy.rb +379 -0
  97. data/spec/dummy/db/migrate/20171124145462_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb +6 -0
  98. data/spec/dummy/db/migrate/20171124145463_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb +6 -0
  99. data/spec/dummy/db/migrate/20171124145464_add_published_at_to_alchemy_pages.alchemy.rb +6 -0
  100. data/spec/dummy/db/migrate/20171124145465_add_parent_element_id_to_alchemy_elements.alchemy.rb +7 -0
  101. data/spec/dummy/db/migrate/20171124145466_add_link_text_to_alchemy_essence_files.alchemy.rb +6 -0
  102. data/spec/dummy/db/migrate/20171124145467_add_locale_to_alchemy_languages.alchemy.rb +8 -0
  103. data/spec/dummy/db/migrate/20171124145468_add_timebased_publishing_columns_to_pages.alchemy.rb +33 -0
  104. data/spec/dummy/db/migrate/20171124145469_add_image_file_format_to_alchemy_pictures.alchemy.rb +10 -0
  105. data/spec/dummy/db/migrate/20171124145470_change_alchemy_pages_locked_to_locked_at.alchemy.rb +23 -0
  106. data/spec/dummy/db/migrate/20171124145471_add_index_to_alchemy_pages_rgt.alchemy.rb +10 -0
  107. data/spec/dummy/db/migrate/20171124145472_add_foreign_key_indices_and_null_constraints.alchemy.rb +21 -0
  108. data/spec/dummy/db/migrate/20171124145473_add_foreign_keys.alchemy.rb +28 -0
  109. data/spec/dummy/db/migrate/20171124145474_create_alchemy_users.alchemy_devise.rb +34 -0
  110. data/spec/dummy/db/migrate/20171124145475_add_alchemy_roles_to_alchemy_users.alchemy_devise.rb +23 -0
  111. data/spec/dummy/db/migrate/20171124145476_add_indexes_to_alchemy_users.alchemy_devise.rb +12 -0
  112. data/spec/dummy/db/migrate/20171124145629_create_settings.kono_mailup.rb +18 -0
  113. data/spec/dummy/db/migrate/20171127115017_create_alchemy_kono_mailup_alchemy_essence_mailup_lists.alchemy_kono_mailup.rb +14 -0
  114. data/spec/dummy/db/schema.rb +351 -0
  115. data/spec/dummy/db/seeds.rb +1 -0
  116. data/spec/dummy/lib/assets/.keep +0 -0
  117. data/spec/dummy/log/.keep +0 -0
  118. data/spec/dummy/public/404.html +67 -0
  119. data/spec/dummy/public/422.html +67 -0
  120. data/spec/dummy/public/500.html +66 -0
  121. data/spec/dummy/public/favicon.ico +0 -0
  122. data/spec/dummy/vendor/assets/javascripts/alchemy/admin/all.js +11 -0
  123. data/spec/dummy/vendor/assets/stylesheets/alchemy/admin/all.css +12 -0
  124. data/spec/models/alchemy_kono_mailup/alchemy/essence_mailup_list_spec.rb +7 -0
  125. metadata +393 -0
@@ -0,0 +1,6 @@
1
+ # This migration comes from alchemy (originally 20130828121054)
2
+ class RemoveDoNotIndexFromAlchemyEssenceTexts < ActiveRecord::Migration[4.2]
3
+ def up
4
+ remove_column :alchemy_essence_texts, :do_not_index
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from alchemy (originally 20130828121120)
2
+ class RemoveDoNotIndexFromAlchemyEssenceRichtexts < ActiveRecord::Migration[4.2]
3
+ def up
4
+ remove_column :alchemy_essence_richtexts, :do_not_index
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from alchemy (originally 20130918201742)
2
+ class AddPublishedAtToAlchemyPages < ActiveRecord::Migration[4.2]
3
+ def change
4
+ add_column :alchemy_pages, :published_at, :timestamp
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ # This migration comes from alchemy (originally 20150608204610)
2
+ class AddParentElementIdToAlchemyElements < ActiveRecord::Migration[4.2]
3
+ def change
4
+ add_column :alchemy_elements, :parent_element_id, :integer
5
+ add_index :alchemy_elements, [:page_id, :parent_element_id]
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from alchemy (originally 20150729151825)
2
+ class AddLinkTextToAlchemyEssenceFiles < ActiveRecord::Migration[4.2]
3
+ def change
4
+ add_column :alchemy_essence_files, :link_text, :string
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ # This migration comes from alchemy (originally 20150906195818)
2
+ class AddLocaleToAlchemyLanguages < ActiveRecord::Migration[4.2]
3
+ def change
4
+ add_column :alchemy_languages, :locale, :string
5
+ execute \
6
+ "UPDATE #{Alchemy::Language.table_name} SET locale = language_code WHERE locale IS NULL;"
7
+ end
8
+ end
@@ -0,0 +1,33 @@
1
+ # This migration comes from alchemy (originally 20160108174834)
2
+ class AddTimebasedPublishingColumnsToPages < ActiveRecord::Migration[4.2]
3
+ def up
4
+ add_column :alchemy_pages, :public_on, :datetime
5
+ add_column :alchemy_pages, :public_until, :datetime
6
+ add_index :alchemy_pages, [:public_on, :public_until]
7
+
8
+ update <<-SQL.strip_heredoc
9
+ UPDATE alchemy_pages
10
+ SET public_on = published_at
11
+ WHERE published_at IS NOT NULL AND public=#{ActiveRecord::Base.connection.quoted_true}
12
+ SQL
13
+
14
+ remove_column :alchemy_pages, :public
15
+ end
16
+
17
+ def down
18
+ add_column :alchemy_pages, :public, :boolean, default: false
19
+ current_time = ActiveRecord::Base.connection.quoted_date(Time.current)
20
+
21
+ update <<-SQL.strip_heredoc
22
+ UPDATE alchemy_pages
23
+ SET public = (
24
+ public_on IS NOT NULL AND public_on < '#{current_time}'
25
+ AND (public_until > '#{current_time}' OR public_until IS NULL)
26
+ )
27
+ SQL
28
+
29
+ remove_index :alchemy_pages, [:public_on, :public_until]
30
+ remove_column :alchemy_pages, :public_on
31
+ remove_column :alchemy_pages, :public_until
32
+ end
33
+ end
@@ -0,0 +1,10 @@
1
+ # This migration comes from alchemy (originally 20160422195310)
2
+ class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration[4.2]
3
+ def up
4
+ add_column :alchemy_pictures, :image_file_format, :string
5
+ end
6
+
7
+ def down
8
+ remove_column :alchemy_pictures, :image_file_format
9
+ end
10
+ end
@@ -0,0 +1,23 @@
1
+ # This migration comes from alchemy (originally 20160617224938)
2
+ class ChangeAlchemyPagesLockedToLockedAt < ActiveRecord::Migration[4.2]
3
+ def up
4
+ add_column :alchemy_pages, :locked_at, :datetime
5
+ update <<-SQL.strip_heredoc
6
+ UPDATE alchemy_pages
7
+ SET locked_at = updated_at
8
+ WHERE locked=#{ActiveRecord::Base.connection.quoted_true}
9
+ SQL
10
+ remove_column :alchemy_pages, :locked
11
+ add_index :alchemy_pages, [:locked_at, :locked_by]
12
+ end
13
+
14
+ def down
15
+ add_column :alchemy_pages, :locked, :boolean
16
+ update <<-SQL.strip_heredoc
17
+ UPDATE alchemy_pages
18
+ SET locked=#{ActiveRecord::Base.connection.quoted_true}
19
+ WHERE locked_at IS NOT NULL
20
+ SQL
21
+ remove_column :alchemy_pages, :locked_at
22
+ end
23
+ end
@@ -0,0 +1,10 @@
1
+ # This migration comes from alchemy (originally 20160912223112)
2
+ class AddIndexToAlchemyPagesRgt < ActiveRecord::Migration[4.2]
3
+ def up
4
+ add_index :alchemy_pages, :rgt
5
+ end
6
+
7
+ def down
8
+ remove_index :alchemy_pages, :rgt
9
+ end
10
+ end
@@ -0,0 +1,21 @@
1
+ # This migration comes from alchemy (originally 20160927205604)
2
+ class AddForeignKeyIndicesAndNullConstraints < ActiveRecord::Migration[4.2]
3
+ def change
4
+ change_column_null :alchemy_cells, :page_id, false, 0
5
+ change_column_null :alchemy_contents, :element_id, false, 0
6
+ change_column_null :alchemy_contents, :essence_id, false, 0
7
+ change_column_null :alchemy_contents, :essence_type, false, 'Alchemy::EssenceText'
8
+ change_column_null :alchemy_elements, :page_id, false, 0
9
+ change_column_null :alchemy_folded_pages, :page_id, false, 0
10
+ change_column_null :alchemy_folded_pages, :user_id, false, 0
11
+ change_column_null :alchemy_languages, :site_id, false, 0
12
+
13
+ add_index :alchemy_cells, :page_id
14
+ add_index :alchemy_contents, [:essence_id, :essence_type], unique: true
15
+ add_index :alchemy_elements, :cell_id
16
+ add_index :alchemy_essence_files, :attachment_id
17
+ add_index :alchemy_essence_pictures, :picture_id
18
+ add_index :alchemy_folded_pages, [:page_id, :user_id], unique: true
19
+ add_index :alchemy_legacy_page_urls, :page_id
20
+ end
21
+ end
@@ -0,0 +1,28 @@
1
+ # This migration comes from alchemy (originally 20160928080104)
2
+ class AddForeignKeys < ActiveRecord::Migration[4.2]
3
+ def change
4
+ add_foreign_key :alchemy_cells, :alchemy_pages,
5
+ column: :page_id,
6
+ on_update: :cascade,
7
+ on_delete: :cascade,
8
+ name: :alchemy_cells_page_id_fkey
9
+
10
+ add_foreign_key :alchemy_contents, :alchemy_elements,
11
+ column: :element_id,
12
+ on_update: :cascade,
13
+ on_delete: :cascade,
14
+ name: :alchemy_contents_element_id_fkey
15
+
16
+ add_foreign_key :alchemy_elements, :alchemy_pages,
17
+ column: :page_id,
18
+ on_update: :cascade,
19
+ on_delete: :cascade,
20
+ name: :alchemy_elements_page_id_fkey
21
+
22
+ add_foreign_key :alchemy_elements, :alchemy_cells,
23
+ column: :cell_id,
24
+ on_update: :cascade,
25
+ on_delete: :cascade,
26
+ name: :alchemy_elements_cell_id_fkey
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ # This migration comes from alchemy_devise (originally 20131015124700)
2
+ class CreateAlchemyUsers < ActiveRecord::Migration[4.2]
3
+ def up
4
+ return if table_exists?(:alchemy_users)
5
+ create_table "alchemy_users" do |t|
6
+ t.string "firstname"
7
+ t.string "lastname"
8
+ t.string "login"
9
+ t.string "email"
10
+ t.string "gender"
11
+ t.string "language"
12
+ t.string "encrypted_password", limit: 128, default: "", null: false
13
+ t.string "password_salt", limit: 128, default: "", null: false
14
+ t.integer "sign_in_count", default: 0, null: false
15
+ t.integer "failed_attempts", default: 0, null: false
16
+ t.datetime "last_request_at"
17
+ t.datetime "current_sign_in_at"
18
+ t.datetime "last_sign_in_at"
19
+ t.string "current_sign_in_ip"
20
+ t.string "last_sign_in_ip"
21
+ t.datetime "created_at", null: false
22
+ t.datetime "updated_at", null: false
23
+ t.integer "creator_id"
24
+ t.integer "updater_id"
25
+ t.text "cached_tag_list"
26
+ t.string "reset_password_token"
27
+ t.datetime "reset_password_sent_at"
28
+ end
29
+
30
+ add_index "alchemy_users", ["email"], unique: true
31
+ add_index "alchemy_users", ["login"], unique: true
32
+ add_index "alchemy_users", ["reset_password_token"], unique: true
33
+ end
34
+ end
@@ -0,0 +1,23 @@
1
+ # This migration comes from alchemy_devise (originally 20131225232042)
2
+ class AddAlchemyRolesToAlchemyUsers < ActiveRecord::Migration[4.2]
3
+ def up
4
+ # Updating old :roles column (since Alchemy CMS v2.6)
5
+ if column_exists?(:alchemy_users, :roles)
6
+ rename_column :alchemy_users, :roles, :alchemy_roles
7
+ change_column :alchemy_users, :alchemy_roles, :string, default: "member"
8
+ end
9
+
10
+ # Creating :alchemy_roles column for new apps.
11
+ unless column_exists?(:alchemy_users, :alchemy_roles)
12
+ add_column :alchemy_users, :alchemy_roles, :string, default: "member"
13
+ end
14
+
15
+ # Renaming the index
16
+ if index_exists?(:alchemy_users, :roles)
17
+ remove_index :alchemy_users, :roles
18
+ end
19
+ unless index_exists?(:alchemy_users, :alchemy_roles)
20
+ add_index :alchemy_users, :alchemy_roles
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from alchemy_devise (originally 20141209144532)
2
+ class AddIndexesToAlchemyUsers < ActiveRecord::Migration[4.2]
3
+ def up
4
+ add_index :alchemy_users, :firstname
5
+ add_index :alchemy_users, :lastname
6
+ end
7
+
8
+ def down
9
+ remove_index :alchemy_users, :firstname
10
+ remove_index :alchemy_users, :lastname
11
+ end
12
+ end
@@ -0,0 +1,18 @@
1
+ # This migration comes from kono_mailup (originally 20171124083941)
2
+ class CreateSettings < ActiveRecord::Migration[4.2]
3
+ def self.up
4
+ create_table :settings do |t|
5
+ t.string :var, null: false
6
+ t.text :value, null: true
7
+ t.integer :thing_id, null: true
8
+ t.string :thing_type, null: true, limit: 30
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :settings, %i(thing_type thing_id var), unique: true
13
+ end
14
+
15
+ def self.down
16
+ drop_table :settings
17
+ end
18
+ end
@@ -0,0 +1,14 @@
1
+ # This migration comes from alchemy_kono_mailup (originally 20171127105007)
2
+ class CreateAlchemyKonoMailupAlchemyEssenceMailupLists < ActiveRecord::Migration[5.1]
3
+ def change
4
+
5
+ create_table :alchemy_essence_mailup_lists do |t|
6
+ t.integer "list_id"
7
+
8
+ t.integer "creator_id"
9
+ t.integer "updater_id"
10
+
11
+ t.timestamps
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,351 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your
6
+ # database schema. If you need to create the application database on another
7
+ # system, you should be using db:schema:load, not running all the migrations
8
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema.define(version: 20171127115017) do
14
+
15
+ create_table "alchemy_attachments", force: :cascade do |t|
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
+ end
28
+
29
+ create_table "alchemy_cells", force: :cascade do |t|
30
+ t.integer "page_id", null: false
31
+ t.string "name"
32
+ t.datetime "created_at", null: false
33
+ t.datetime "updated_at", null: false
34
+ t.index ["page_id"], name: "index_alchemy_cells_on_page_id"
35
+ end
36
+
37
+ create_table "alchemy_contents", force: :cascade do |t|
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
49
+ end
50
+
51
+ create_table "alchemy_elements", force: :cascade do |t|
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"
68
+ end
69
+
70
+ create_table "alchemy_elements_alchemy_pages", id: false, force: :cascade do |t|
71
+ t.integer "element_id"
72
+ t.integer "page_id"
73
+ end
74
+
75
+ create_table "alchemy_essence_booleans", force: :cascade do |t|
76
+ t.boolean "value"
77
+ t.datetime "created_at", null: false
78
+ t.datetime "updated_at", null: false
79
+ t.integer "creator_id"
80
+ t.integer "updater_id"
81
+ t.index ["value"], name: "index_alchemy_essence_booleans_on_value"
82
+ end
83
+
84
+ create_table "alchemy_essence_dates", force: :cascade do |t|
85
+ t.datetime "date"
86
+ t.integer "creator_id"
87
+ t.integer "updater_id"
88
+ t.datetime "created_at", null: false
89
+ t.datetime "updated_at", null: false
90
+ end
91
+
92
+ create_table "alchemy_essence_files", force: :cascade do |t|
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"
102
+ end
103
+
104
+ create_table "alchemy_essence_htmls", force: :cascade do |t|
105
+ t.text "source"
106
+ t.integer "creator_id"
107
+ t.integer "updater_id"
108
+ t.datetime "created_at", null: false
109
+ t.datetime "updated_at", null: false
110
+ end
111
+
112
+ create_table "alchemy_essence_links", force: :cascade do |t|
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"
121
+ end
122
+
123
+ create_table "alchemy_essence_mailup_lists", force: :cascade do |t|
124
+ t.integer "list_id"
125
+ t.integer "creator_id"
126
+ t.integer "updater_id"
127
+ t.datetime "created_at", null: false
128
+ t.datetime "updated_at", null: false
129
+ end
130
+
131
+ create_table "alchemy_essence_pictures", force: :cascade do |t|
132
+ t.integer "picture_id"
133
+ t.string "caption"
134
+ t.string "title"
135
+ t.string "alt_tag"
136
+ t.string "link"
137
+ t.string "link_class_name"
138
+ t.string "link_title"
139
+ t.string "css_class"
140
+ t.string "link_target"
141
+ t.integer "creator_id"
142
+ t.integer "updater_id"
143
+ t.datetime "created_at", null: false
144
+ t.datetime "updated_at", null: false
145
+ t.string "crop_from"
146
+ t.string "crop_size"
147
+ t.string "render_size"
148
+ t.index ["picture_id"], name: "index_alchemy_essence_pictures_on_picture_id"
149
+ end
150
+
151
+ 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
159
+ end
160
+
161
+ create_table "alchemy_essence_selects", force: :cascade do |t|
162
+ t.string "value"
163
+ t.datetime "created_at", null: false
164
+ t.datetime "updated_at", null: false
165
+ t.integer "creator_id"
166
+ t.integer "updater_id"
167
+ t.index ["value"], name: "index_alchemy_essence_selects_on_value"
168
+ end
169
+
170
+ create_table "alchemy_essence_texts", force: :cascade do |t|
171
+ t.text "body"
172
+ t.string "link"
173
+ t.string "link_title"
174
+ t.string "link_class_name"
175
+ t.boolean "public", default: false
176
+ t.string "link_target"
177
+ t.integer "creator_id"
178
+ t.integer "updater_id"
179
+ t.datetime "created_at", null: false
180
+ t.datetime "updated_at", null: false
181
+ end
182
+
183
+ create_table "alchemy_folded_pages", force: :cascade do |t|
184
+ t.integer "page_id", null: false
185
+ t.integer "user_id", null: false
186
+ t.boolean "folded", default: false
187
+ t.index ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true
188
+ end
189
+
190
+ create_table "alchemy_languages", force: :cascade do |t|
191
+ t.string "name"
192
+ t.string "language_code"
193
+ t.string "frontpage_name"
194
+ t.string "page_layout", default: "intro"
195
+ t.boolean "public", default: false
196
+ t.datetime "created_at", null: false
197
+ t.datetime "updated_at", null: false
198
+ t.integer "creator_id"
199
+ t.integer "updater_id"
200
+ t.boolean "default", default: false
201
+ t.string "country_code", default: "", null: false
202
+ t.integer "site_id", null: false
203
+ t.string "locale"
204
+ t.index ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
205
+ t.index ["language_code"], name: "index_alchemy_languages_on_language_code"
206
+ t.index ["site_id"], name: "index_alchemy_languages_on_site_id"
207
+ end
208
+
209
+ create_table "alchemy_legacy_page_urls", force: :cascade do |t|
210
+ t.string "urlname", null: false
211
+ t.integer "page_id", null: false
212
+ t.datetime "created_at", null: false
213
+ t.datetime "updated_at", null: false
214
+ t.index ["page_id"], name: "index_alchemy_legacy_page_urls_on_page_id"
215
+ t.index ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
216
+ end
217
+
218
+ create_table "alchemy_pages", force: :cascade do |t|
219
+ t.string "name"
220
+ t.string "urlname"
221
+ t.string "title"
222
+ t.string "language_code"
223
+ t.boolean "language_root"
224
+ t.string "page_layout"
225
+ t.text "meta_keywords"
226
+ t.text "meta_description"
227
+ t.integer "lft"
228
+ t.integer "rgt"
229
+ t.integer "parent_id"
230
+ t.integer "depth"
231
+ t.boolean "visible", default: false
232
+ t.integer "locked_by"
233
+ t.boolean "restricted", default: false
234
+ t.boolean "robot_index", default: true
235
+ t.boolean "robot_follow", default: true
236
+ t.boolean "sitemap", default: true
237
+ t.boolean "layoutpage", default: false
238
+ t.datetime "created_at", null: false
239
+ t.datetime "updated_at", null: false
240
+ t.integer "creator_id"
241
+ t.integer "updater_id"
242
+ t.integer "language_id"
243
+ t.text "cached_tag_list"
244
+ t.datetime "published_at"
245
+ t.datetime "public_on"
246
+ t.datetime "public_until"
247
+ t.datetime "locked_at"
248
+ t.index ["language_id"], name: "index_pages_on_language_id"
249
+ t.index ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by"
250
+ t.index ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
251
+ t.index ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until"
252
+ t.index ["rgt"], name: "index_alchemy_pages_on_rgt"
253
+ t.index ["urlname"], name: "index_pages_on_urlname"
254
+ end
255
+
256
+ create_table "alchemy_pictures", force: :cascade do |t|
257
+ t.string "name"
258
+ t.string "image_file_name"
259
+ t.integer "image_file_width"
260
+ t.integer "image_file_height"
261
+ t.datetime "created_at", null: false
262
+ t.datetime "updated_at", null: false
263
+ t.integer "creator_id"
264
+ t.integer "updater_id"
265
+ t.string "upload_hash"
266
+ t.text "cached_tag_list"
267
+ t.string "image_file_uid"
268
+ t.integer "image_file_size"
269
+ t.string "image_file_format"
270
+ end
271
+
272
+ create_table "alchemy_sites", force: :cascade do |t|
273
+ t.string "host"
274
+ t.string "name"
275
+ t.datetime "created_at", null: false
276
+ t.datetime "updated_at", null: false
277
+ t.boolean "public", default: false
278
+ t.text "aliases"
279
+ t.boolean "redirect_to_primary_host"
280
+ t.index ["host", "public"], name: "alchemy_sites_public_hosts_idx"
281
+ t.index ["host"], name: "index_alchemy_sites_on_host"
282
+ end
283
+
284
+ create_table "alchemy_users", force: :cascade do |t|
285
+ t.string "firstname"
286
+ t.string "lastname"
287
+ t.string "login"
288
+ t.string "email"
289
+ t.string "gender"
290
+ t.string "language"
291
+ t.string "encrypted_password", limit: 128, default: "", null: false
292
+ t.string "password_salt", limit: 128, default: "", null: false
293
+ t.integer "sign_in_count", default: 0, null: false
294
+ t.integer "failed_attempts", default: 0, null: false
295
+ t.datetime "last_request_at"
296
+ t.datetime "current_sign_in_at"
297
+ t.datetime "last_sign_in_at"
298
+ t.string "current_sign_in_ip"
299
+ t.string "last_sign_in_ip"
300
+ t.datetime "created_at", null: false
301
+ t.datetime "updated_at", null: false
302
+ t.integer "creator_id"
303
+ t.integer "updater_id"
304
+ t.text "cached_tag_list"
305
+ t.string "reset_password_token"
306
+ t.datetime "reset_password_sent_at"
307
+ t.string "alchemy_roles", default: "member"
308
+ t.index ["alchemy_roles"], name: "index_alchemy_users_on_alchemy_roles"
309
+ t.index ["email"], name: "index_alchemy_users_on_email", unique: true
310
+ t.index ["firstname"], name: "index_alchemy_users_on_firstname"
311
+ t.index ["lastname"], name: "index_alchemy_users_on_lastname"
312
+ t.index ["login"], name: "index_alchemy_users_on_login", unique: true
313
+ t.index ["reset_password_token"], name: "index_alchemy_users_on_reset_password_token", unique: true
314
+ end
315
+
316
+ create_table "settings", force: :cascade do |t|
317
+ t.string "var", null: false
318
+ t.text "value"
319
+ t.integer "thing_id"
320
+ t.string "thing_type", limit: 30
321
+ t.datetime "created_at"
322
+ t.datetime "updated_at"
323
+ t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true
324
+ end
325
+
326
+ create_table "taggings", force: :cascade do |t|
327
+ t.integer "tag_id"
328
+ t.string "taggable_type"
329
+ t.integer "taggable_id"
330
+ t.string "tagger_type"
331
+ t.integer "tagger_id"
332
+ t.string "context", limit: 128
333
+ t.datetime "created_at"
334
+ t.index ["context"], name: "index_taggings_on_context"
335
+ t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
336
+ t.index ["tag_id"], name: "index_taggings_on_tag_id"
337
+ t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
338
+ t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
339
+ t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
340
+ t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
341
+ t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
342
+ t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
343
+ end
344
+
345
+ create_table "tags", force: :cascade do |t|
346
+ t.string "name"
347
+ t.integer "taggings_count", default: 0
348
+ t.index ["name"], name: "index_tags_on_name", unique: true
349
+ end
350
+
351
+ end