bcms_aws_s3-artirix 4.0.0.rc1.art4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +36 -0
  3. data/app/assets/javascripts/bcms_s3/application.js +13 -0
  4. data/app/assets/stylesheets/bcms_s3/application.css +13 -0
  5. data/app/controllers/bcms_s3/application_controller.rb +4 -0
  6. data/app/helpers/bcms_s3/application_helper.rb +4 -0
  7. data/app/views/layouts/bcms_s3/application.html.erb +14 -0
  8. data/config/routes.rb +2 -0
  9. data/lib/bcms_aws_s3-artirix.rb +1 -0
  10. data/lib/bcms_aws_s3.rb +4 -0
  11. data/lib/bcms_s3/engine.rb +31 -0
  12. data/lib/bcms_s3/s3_module.rb +24 -0
  13. data/lib/bcms_s3/version.rb +3 -0
  14. data/lib/cms/attachments/s3_strategy.rb +31 -0
  15. data/lib/generators/bcms_s3/install/USAGE +3 -0
  16. data/lib/generators/bcms_s3/install/install_generator.rb +21 -0
  17. data/lib/tasks/bcms_s3_tasks.rake +4 -0
  18. data/test/bcms_s3_test.rb +7 -0
  19. data/test/dummy/README.rdoc +28 -0
  20. data/test/dummy/Rakefile +6 -0
  21. data/test/dummy/app/assets/javascripts/application.js +13 -0
  22. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  23. data/test/dummy/app/controllers/application_controller.rb +5 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/test/dummy/app/views/layouts/templates/default.html.erb +16 -0
  27. data/test/dummy/bin/bundle +3 -0
  28. data/test/dummy/bin/rails +4 -0
  29. data/test/dummy/bin/rake +4 -0
  30. data/test/dummy/config.ru +4 -0
  31. data/test/dummy/config/application.rb +23 -0
  32. data/test/dummy/config/boot.rb +5 -0
  33. data/test/dummy/config/database.yml +25 -0
  34. data/test/dummy/config/environment.rb +5 -0
  35. data/test/dummy/config/environments/development.rb +29 -0
  36. data/test/dummy/config/environments/production.rb +86 -0
  37. data/test/dummy/config/environments/test.rb +36 -0
  38. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  39. data/test/dummy/config/initializers/browsercms.rb +1 -0
  40. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  41. data/test/dummy/config/initializers/inflections.rb +16 -0
  42. data/test/dummy/config/initializers/mime_types.rb +5 -0
  43. data/test/dummy/config/initializers/secret_token.rb +12 -0
  44. data/test/dummy/config/initializers/session_store.rb +3 -0
  45. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  46. data/test/dummy/config/locales/en.yml +23 -0
  47. data/test/dummy/config/routes.rb +6 -0
  48. data/test/dummy/config/s3.yml +2 -0
  49. data/test/dummy/db/browsercms.seeds.rb +59 -0
  50. data/test/dummy/db/migrate/20140204192558_browsercms300.cms.rb +288 -0
  51. data/test/dummy/db/migrate/20140204192559_browsercms400.cms.rb +91 -0
  52. data/test/dummy/db/migrate/20140204192560_devise_create_users.cms.rb +48 -0
  53. data/test/dummy/db/migrate/20140204192561_kill_reset_password.cms.rb +6 -0
  54. data/test/dummy/db/migrate/20140204192562_create_cms_external_users.cms.rb +11 -0
  55. data/test/dummy/db/schema.rb +558 -0
  56. data/test/dummy/db/seeds.rb +3 -0
  57. data/test/dummy/db/test.sqlite3 +0 -0
  58. data/test/dummy/log/test.log +5 -0
  59. data/test/dummy/public/404.html +58 -0
  60. data/test/dummy/public/422.html +58 -0
  61. data/test/dummy/public/500.html +57 -0
  62. data/test/dummy/public/favicon.ico +0 -0
  63. data/test/integration/navigation_test.rb +10 -0
  64. data/test/test_helper.rb +15 -0
  65. metadata +198 -0
@@ -0,0 +1,91 @@
1
+ # This migration comes from cms (originally 20130327184912)
2
+ class Browsercms400 < ActiveRecord::Migration
3
+
4
+ def up
5
+ apply_cms_namespace_to_all_core_tables
6
+
7
+ add_column :cms_section_nodes, :slug, :string
8
+ add_content_column :cms_dynamic_views, :path, :string
9
+ add_content_column :cms_dynamic_views, :locale, :string, default: 'en'
10
+ add_content_column :cms_dynamic_views, :partial, :boolean, default: false
11
+
12
+ Cms::PageTemplate.all.find_each do |pt|
13
+ pt.path = "layout/templates/#{pt.name}"
14
+ pt.locale = "en"
15
+ pt.save!
16
+ end
17
+
18
+ Cms::PagePartial.all.find_each do |pp|
19
+ pp.path = "partials/#{pp.name}"
20
+ pp.locale = "en"
21
+ pp.partial = true
22
+ pp.save!
23
+ end
24
+
25
+ drop_table :cms_content_type_groups
26
+ drop_table :cms_content_types
27
+
28
+ create_content_table :cms_forms do |t|
29
+ t.string :name
30
+ t.text :description
31
+ t.string :confirmation_behavior
32
+ t.text :confirmation_text
33
+ t.string :confirmation_redirect
34
+ t.string :notification_email
35
+ end
36
+
37
+ create_table :cms_form_fields do |t|
38
+ t.integer :form_id
39
+ t.string :label
40
+ t.string :name
41
+ t.string :field_type
42
+ t.boolean :required
43
+ t.integer :position
44
+ t.text :instructions
45
+ t.text :default_value
46
+ t.text :choices
47
+ t.timestamps
48
+ end
49
+
50
+ # Field names should be unique per form
51
+ add_index :cms_form_fields, [:form_id, :name], :unique => true
52
+
53
+ create_table :cms_form_entries do |t|
54
+ t.text :data_columns
55
+ t.integer :form_id
56
+ t.timestamps
57
+ end
58
+
59
+ end
60
+
61
+ private
62
+
63
+ # In 4.x, all core tables MUST start with cms_. See https://github.com/browsermedia/browsercms/issues/639
64
+ def apply_cms_namespace_to_all_core_tables
65
+ unversioned_tables.each do |table_name|
66
+ if (needs_namespacing(table_name))
67
+ rename_table table_name, cms_(table_name)
68
+ end
69
+ end
70
+
71
+ versioned_tables.each do |table_name|
72
+ if (needs_namespacing(table_name))
73
+ rename_table table_name, cms_(table_name)
74
+ rename_table versioned_(table_name), cms_(versioned_(table_name))
75
+ end
76
+ end
77
+ end
78
+
79
+ # All tables that aren't versioned. (I.e. two tables)
80
+ def unversioned_tables
81
+ [:categories, :category_types, :connectors, :content_types, :content_type_groups, :email_messages, :group_permissions, :group_sections, :group_type_permissions, :group_types, :groups, :page_route_options, :page_routes, :permissions, :portlet_attributes, :portlets, :redirects, :section_nodes, :sections, :sites, :taggings, :tags, :tasks, :user_group_memberships, :users]
82
+ end
83
+
84
+ def versioned_tables
85
+ [:attachments, :dynamic_views, :file_blocks, :html_blocks, :links, :pages]
86
+ end
87
+
88
+ def needs_namespacing(table_name)
89
+ table_exists?(table_name) && !table_exists?(cms_(table_name))
90
+ end
91
+ end
@@ -0,0 +1,48 @@
1
+ # This migration comes from cms (originally 20131206214021)
2
+ class DeviseCreateUsers < ActiveRecord::Migration
3
+ def change
4
+ change_table(:cms_users) do |t|
5
+ ## Database authenticatable
6
+ #t.string :email, :null => false, :default => ""
7
+ t.string :encrypted_password, :null => false, :default => ""
8
+
9
+ ## Recoverable
10
+ t.rename :reset_token, :reset_password_token
11
+ t.datetime :reset_password_sent_at
12
+
13
+ ## Rememberable
14
+ t.rename :remember_token_expires_at, :remember_created_at
15
+ t.remove :remember_token # Not needed by devise.
16
+
17
+ # Remove old SHA based encrypted passwords.
18
+ # Comment out the following line if you have a strong need to preserve old hashed passwords
19
+ t.remove :crypted_password
20
+
21
+ ## Trackable
22
+ #t.integer :sign_in_count, :default => 0, :null => false
23
+ #t.datetime :current_sign_in_at
24
+ #t.datetime :last_sign_in_at
25
+ #t.string :current_sign_in_ip
26
+ #t.string :last_sign_in_ip
27
+
28
+ ## Confirmable
29
+ # t.string :confirmation_token
30
+ # t.datetime :confirmed_at
31
+ # t.datetime :confirmation_sent_at
32
+ # t.string :unconfirmed_email # Only if using reconfirmable
33
+
34
+ ## Lockable
35
+ # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
36
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
37
+ # t.datetime :locked_at
38
+
39
+
40
+ #t.timestamps
41
+ end
42
+
43
+ add_index :cms_users, :email, :unique => true
44
+ add_index :cms_users, :reset_password_token, :unique => true
45
+ # add_index :users, :confirmation_token, :unique => true
46
+ # add_index :users, :unlock_token, :unique => true
47
+ end
48
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from cms (originally 20131211223908)
2
+ class KillResetPassword < ActiveRecord::Migration
3
+ def up
4
+ Cms::Portlet.connection.execute("UPDATE cms_portlets SET type = 'DeprecatedPlaceholder' WHERE type = 'ResetPasswordPortlet'")
5
+ end
6
+ end
@@ -0,0 +1,11 @@
1
+ # This migration comes from cms (originally 20131218222005)
2
+ class CreateCmsExternalUsers < ActiveRecord::Migration
3
+ def change
4
+ change_table :cms_users do |t|
5
+ t.column :type, :string, default: 'Cms::User'
6
+ t.column :source, :string
7
+ t.text :external_data
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,558 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140204192562) do
15
+
16
+ create_table "cms_attachment_versions", force: true do |t|
17
+ t.string "data_file_name"
18
+ t.string "data_file_path"
19
+ t.string "file_location"
20
+ t.string "data_content_type"
21
+ t.integer "data_file_size"
22
+ t.string "data_fingerprint"
23
+ t.string "attachable_type"
24
+ t.string "attachment_name"
25
+ t.integer "attachable_id"
26
+ t.integer "attachable_version"
27
+ t.string "cardinality"
28
+ t.integer "original_record_id"
29
+ t.integer "version"
30
+ t.boolean "published", default: false
31
+ t.boolean "deleted", default: false
32
+ t.boolean "archived", default: false
33
+ t.string "version_comment"
34
+ t.integer "created_by_id"
35
+ t.integer "updated_by_id"
36
+ t.datetime "created_at"
37
+ t.datetime "updated_at"
38
+ end
39
+
40
+ add_index "cms_attachment_versions", ["original_record_id"], name: "index_cms_attachment_versions_on_original_record_id"
41
+
42
+ create_table "cms_attachments", force: true do |t|
43
+ t.string "data_file_name"
44
+ t.string "data_file_path"
45
+ t.string "file_location"
46
+ t.string "data_content_type"
47
+ t.integer "data_file_size"
48
+ t.string "data_fingerprint"
49
+ t.string "attachable_type"
50
+ t.string "attachment_name"
51
+ t.integer "attachable_id"
52
+ t.integer "attachable_version"
53
+ t.string "cardinality"
54
+ t.integer "version"
55
+ t.integer "lock_version", default: 0
56
+ t.boolean "published", default: false
57
+ t.boolean "deleted", default: false
58
+ t.boolean "archived", default: false
59
+ t.integer "created_by_id"
60
+ t.integer "updated_by_id"
61
+ t.datetime "created_at"
62
+ t.datetime "updated_at"
63
+ end
64
+
65
+ create_table "cms_categories", force: true do |t|
66
+ t.integer "category_type_id"
67
+ t.integer "parent_id"
68
+ t.string "name"
69
+ t.datetime "created_at"
70
+ t.datetime "updated_at"
71
+ end
72
+
73
+ create_table "cms_category_types", force: true do |t|
74
+ t.string "name"
75
+ t.datetime "created_at"
76
+ t.datetime "updated_at"
77
+ end
78
+
79
+ create_table "cms_connectors", force: true do |t|
80
+ t.integer "page_id"
81
+ t.integer "page_version"
82
+ t.integer "connectable_id"
83
+ t.string "connectable_type"
84
+ t.integer "connectable_version"
85
+ t.string "container"
86
+ t.integer "position"
87
+ t.datetime "created_at"
88
+ t.datetime "updated_at"
89
+ end
90
+
91
+ add_index "cms_connectors", ["connectable_type"], name: "index_cms_connectors_on_connectable_type"
92
+ add_index "cms_connectors", ["connectable_version"], name: "index_cms_connectors_on_connectable_version"
93
+ add_index "cms_connectors", ["page_id"], name: "index_cms_connectors_on_page_id"
94
+ add_index "cms_connectors", ["page_version"], name: "index_cms_connectors_on_page_version"
95
+
96
+ create_table "cms_dynamic_view_versions", force: true do |t|
97
+ t.string "type"
98
+ t.string "name"
99
+ t.string "format"
100
+ t.string "handler"
101
+ t.text "body"
102
+ t.datetime "created_at"
103
+ t.datetime "updated_at"
104
+ t.integer "original_record_id"
105
+ t.integer "version"
106
+ t.boolean "published", default: false
107
+ t.boolean "deleted", default: false
108
+ t.boolean "archived", default: false
109
+ t.string "version_comment"
110
+ t.integer "created_by_id"
111
+ t.integer "updated_by_id"
112
+ t.string "path"
113
+ t.string "locale", default: "en"
114
+ t.boolean "partial", default: false
115
+ end
116
+
117
+ create_table "cms_dynamic_views", force: true do |t|
118
+ t.string "type"
119
+ t.string "name"
120
+ t.string "format"
121
+ t.string "handler"
122
+ t.text "body"
123
+ t.datetime "created_at"
124
+ t.datetime "updated_at"
125
+ t.integer "version"
126
+ t.integer "lock_version", default: 0
127
+ t.boolean "published", default: false
128
+ t.boolean "deleted", default: false
129
+ t.boolean "archived", default: false
130
+ t.integer "created_by_id"
131
+ t.integer "updated_by_id"
132
+ t.string "path"
133
+ t.string "locale", default: "en"
134
+ t.boolean "partial", default: false
135
+ end
136
+
137
+ create_table "cms_email_messages", force: true do |t|
138
+ t.string "sender"
139
+ t.text "recipients"
140
+ t.text "subject"
141
+ t.text "cc"
142
+ t.text "bcc"
143
+ t.text "body"
144
+ t.string "content_type"
145
+ t.datetime "delivered_at"
146
+ t.datetime "created_at"
147
+ t.datetime "updated_at"
148
+ end
149
+
150
+ create_table "cms_file_block_versions", force: true do |t|
151
+ t.string "type"
152
+ t.string "name"
153
+ t.integer "attachment_id"
154
+ t.integer "attachment_version"
155
+ t.integer "original_record_id"
156
+ t.integer "version"
157
+ t.boolean "published", default: false
158
+ t.boolean "deleted", default: false
159
+ t.boolean "archived", default: false
160
+ t.string "version_comment"
161
+ t.integer "created_by_id"
162
+ t.integer "updated_by_id"
163
+ t.datetime "created_at"
164
+ t.datetime "updated_at"
165
+ end
166
+
167
+ add_index "cms_file_block_versions", ["original_record_id"], name: "index_cms_file_block_versions_on_original_record_id"
168
+ add_index "cms_file_block_versions", ["version"], name: "index_cms_file_block_versions_on_version"
169
+
170
+ create_table "cms_file_blocks", force: true do |t|
171
+ t.string "type"
172
+ t.string "name"
173
+ t.integer "attachment_id"
174
+ t.integer "attachment_version"
175
+ t.integer "version"
176
+ t.integer "lock_version", default: 0
177
+ t.boolean "published", default: false
178
+ t.boolean "deleted", default: false
179
+ t.boolean "archived", default: false
180
+ t.integer "created_by_id"
181
+ t.integer "updated_by_id"
182
+ t.datetime "created_at"
183
+ t.datetime "updated_at"
184
+ end
185
+
186
+ add_index "cms_file_blocks", ["deleted"], name: "index_cms_file_blocks_on_deleted"
187
+ add_index "cms_file_blocks", ["type"], name: "index_cms_file_blocks_on_type"
188
+
189
+ create_table "cms_form_entries", force: true do |t|
190
+ t.text "data_columns"
191
+ t.integer "form_id"
192
+ t.datetime "created_at"
193
+ t.datetime "updated_at"
194
+ end
195
+
196
+ create_table "cms_form_fields", force: true do |t|
197
+ t.integer "form_id"
198
+ t.string "label"
199
+ t.string "name"
200
+ t.string "field_type"
201
+ t.boolean "required"
202
+ t.integer "position"
203
+ t.text "instructions"
204
+ t.text "default_value"
205
+ t.text "choices"
206
+ t.datetime "created_at"
207
+ t.datetime "updated_at"
208
+ end
209
+
210
+ add_index "cms_form_fields", ["form_id", "name"], name: "index_cms_form_fields_on_form_id_and_name", unique: true
211
+
212
+ create_table "cms_form_versions", force: true do |t|
213
+ t.string "name"
214
+ t.text "description"
215
+ t.string "confirmation_behavior"
216
+ t.text "confirmation_text"
217
+ t.string "confirmation_redirect"
218
+ t.string "notification_email"
219
+ t.integer "original_record_id"
220
+ t.integer "version"
221
+ t.boolean "published", default: false
222
+ t.boolean "deleted", default: false
223
+ t.boolean "archived", default: false
224
+ t.string "version_comment"
225
+ t.integer "created_by_id"
226
+ t.integer "updated_by_id"
227
+ t.datetime "created_at"
228
+ t.datetime "updated_at"
229
+ end
230
+
231
+ create_table "cms_forms", force: true do |t|
232
+ t.string "name"
233
+ t.text "description"
234
+ t.string "confirmation_behavior"
235
+ t.text "confirmation_text"
236
+ t.string "confirmation_redirect"
237
+ t.string "notification_email"
238
+ t.integer "version"
239
+ t.integer "lock_version", default: 0
240
+ t.boolean "published", default: false
241
+ t.boolean "deleted", default: false
242
+ t.boolean "archived", default: false
243
+ t.integer "created_by_id"
244
+ t.integer "updated_by_id"
245
+ t.datetime "created_at"
246
+ t.datetime "updated_at"
247
+ end
248
+
249
+ create_table "cms_group_permissions", force: true do |t|
250
+ t.integer "group_id"
251
+ t.integer "permission_id"
252
+ end
253
+
254
+ add_index "cms_group_permissions", ["group_id", "permission_id"], name: "index_cms_group_permissions_on_group_id_and_permission_id"
255
+ add_index "cms_group_permissions", ["group_id"], name: "index_cms_group_permissions_on_group_id"
256
+ add_index "cms_group_permissions", ["permission_id"], name: "index_cms_group_permissions_on_permission_id"
257
+
258
+ create_table "cms_group_sections", force: true do |t|
259
+ t.integer "group_id"
260
+ t.integer "section_id"
261
+ end
262
+
263
+ add_index "cms_group_sections", ["group_id"], name: "index_cms_group_sections_on_group_id"
264
+ add_index "cms_group_sections", ["section_id"], name: "index_cms_group_sections_on_section_id"
265
+
266
+ create_table "cms_group_type_permissions", force: true do |t|
267
+ t.integer "group_type_id"
268
+ t.integer "permission_id"
269
+ end
270
+
271
+ create_table "cms_group_types", force: true do |t|
272
+ t.string "name"
273
+ t.boolean "guest", default: false
274
+ t.boolean "cms_access", default: false
275
+ t.datetime "created_at"
276
+ t.datetime "updated_at"
277
+ end
278
+
279
+ add_index "cms_group_types", ["cms_access"], name: "index_cms_group_types_on_cms_access"
280
+
281
+ create_table "cms_groups", force: true do |t|
282
+ t.string "name"
283
+ t.string "code"
284
+ t.integer "group_type_id"
285
+ t.datetime "created_at"
286
+ t.datetime "updated_at"
287
+ end
288
+
289
+ add_index "cms_groups", ["code"], name: "index_cms_groups_on_code"
290
+ add_index "cms_groups", ["group_type_id"], name: "index_cms_groups_on_group_type_id"
291
+
292
+ create_table "cms_html_block_versions", force: true do |t|
293
+ t.text "content", limit: 65537
294
+ t.integer "original_record_id"
295
+ t.integer "version"
296
+ t.string "name"
297
+ t.boolean "published", default: false
298
+ t.boolean "deleted", default: false
299
+ t.boolean "archived", default: false
300
+ t.string "version_comment"
301
+ t.integer "created_by_id"
302
+ t.integer "updated_by_id"
303
+ t.datetime "created_at"
304
+ t.datetime "updated_at"
305
+ end
306
+
307
+ add_index "cms_html_block_versions", ["original_record_id"], name: "index_cms_html_block_versions_on_original_record_id"
308
+ add_index "cms_html_block_versions", ["version"], name: "index_cms_html_block_versions_on_version"
309
+
310
+ create_table "cms_html_blocks", force: true do |t|
311
+ t.text "content", limit: 65537
312
+ t.integer "version"
313
+ t.integer "lock_version", default: 0
314
+ t.string "name"
315
+ t.boolean "published", default: false
316
+ t.boolean "deleted", default: false
317
+ t.boolean "archived", default: false
318
+ t.integer "created_by_id"
319
+ t.integer "updated_by_id"
320
+ t.datetime "created_at"
321
+ t.datetime "updated_at"
322
+ end
323
+
324
+ add_index "cms_html_blocks", ["deleted"], name: "index_cms_html_blocks_on_deleted"
325
+
326
+ create_table "cms_link_versions", force: true do |t|
327
+ t.string "name"
328
+ t.string "url"
329
+ t.boolean "new_window", default: false
330
+ t.datetime "created_at"
331
+ t.datetime "updated_at"
332
+ t.integer "original_record_id"
333
+ t.integer "version"
334
+ t.boolean "published", default: false
335
+ t.boolean "deleted", default: false
336
+ t.boolean "archived", default: false
337
+ t.string "version_comment"
338
+ t.integer "created_by_id"
339
+ t.integer "updated_by_id"
340
+ end
341
+
342
+ create_table "cms_links", force: true do |t|
343
+ t.string "name"
344
+ t.string "url"
345
+ t.boolean "new_window", default: false
346
+ t.datetime "created_at"
347
+ t.datetime "updated_at"
348
+ t.integer "version"
349
+ t.integer "lock_version", default: 0
350
+ t.boolean "published", default: false
351
+ t.boolean "deleted", default: false
352
+ t.boolean "archived", default: false
353
+ t.integer "created_by_id"
354
+ t.integer "updated_by_id"
355
+ t.integer "latest_version"
356
+ end
357
+
358
+ create_table "cms_page_route_options", force: true do |t|
359
+ t.integer "page_route_id"
360
+ t.string "type"
361
+ t.string "name"
362
+ t.string "value"
363
+ t.datetime "created_at"
364
+ t.datetime "updated_at"
365
+ end
366
+
367
+ create_table "cms_page_routes", force: true do |t|
368
+ t.string "name"
369
+ t.string "pattern"
370
+ t.integer "page_id"
371
+ t.text "code"
372
+ t.datetime "created_at"
373
+ t.datetime "updated_at"
374
+ end
375
+
376
+ create_table "cms_page_versions", force: true do |t|
377
+ t.string "name"
378
+ t.string "title"
379
+ t.string "path"
380
+ t.string "template_file_name"
381
+ t.text "description"
382
+ t.text "keywords"
383
+ t.string "language"
384
+ t.boolean "cacheable", default: false
385
+ t.boolean "hidden", default: false
386
+ t.integer "original_record_id"
387
+ t.integer "version"
388
+ t.boolean "published", default: false
389
+ t.boolean "deleted", default: false
390
+ t.boolean "archived", default: false
391
+ t.string "version_comment"
392
+ t.integer "created_by_id"
393
+ t.integer "updated_by_id"
394
+ t.datetime "created_at"
395
+ t.datetime "updated_at"
396
+ end
397
+
398
+ add_index "cms_page_versions", ["original_record_id"], name: "index_cms_page_versions_on_original_record_id"
399
+
400
+ create_table "cms_pages", force: true do |t|
401
+ t.string "name"
402
+ t.string "title"
403
+ t.string "path"
404
+ t.string "template_file_name"
405
+ t.text "description"
406
+ t.text "keywords"
407
+ t.string "language"
408
+ t.boolean "cacheable", default: false
409
+ t.boolean "hidden", default: false
410
+ t.integer "version"
411
+ t.integer "lock_version", default: 0
412
+ t.boolean "published", default: false
413
+ t.boolean "deleted", default: false
414
+ t.boolean "archived", default: false
415
+ t.integer "created_by_id"
416
+ t.integer "updated_by_id"
417
+ t.datetime "created_at"
418
+ t.datetime "updated_at"
419
+ t.integer "latest_version"
420
+ end
421
+
422
+ add_index "cms_pages", ["deleted"], name: "index_cms_pages_on_deleted"
423
+ add_index "cms_pages", ["path"], name: "index_cms_pages_on_path"
424
+ add_index "cms_pages", ["version"], name: "index_cms_pages_on_version"
425
+
426
+ create_table "cms_permissions", force: true do |t|
427
+ t.string "name"
428
+ t.string "full_name"
429
+ t.string "description"
430
+ t.string "for_module"
431
+ t.datetime "created_at"
432
+ t.datetime "updated_at"
433
+ end
434
+
435
+ create_table "cms_portlet_attributes", force: true do |t|
436
+ t.integer "portlet_id"
437
+ t.string "name"
438
+ t.text "value"
439
+ end
440
+
441
+ add_index "cms_portlet_attributes", ["portlet_id"], name: "index_cms_portlet_attributes_on_portlet_id"
442
+
443
+ create_table "cms_portlets", force: true do |t|
444
+ t.string "type"
445
+ t.string "name"
446
+ t.boolean "archived", default: false
447
+ t.boolean "deleted", default: false
448
+ t.integer "created_by_id"
449
+ t.integer "updated_by_id"
450
+ t.datetime "created_at"
451
+ t.datetime "updated_at"
452
+ end
453
+
454
+ add_index "cms_portlets", ["name"], name: "index_cms_portlets_on_name"
455
+
456
+ create_table "cms_redirects", force: true do |t|
457
+ t.string "from_path"
458
+ t.string "to_path"
459
+ t.datetime "created_at"
460
+ t.datetime "updated_at"
461
+ end
462
+
463
+ add_index "cms_redirects", ["from_path"], name: "index_cms_redirects_on_from_path"
464
+
465
+ create_table "cms_section_nodes", force: true do |t|
466
+ t.string "node_type"
467
+ t.integer "node_id"
468
+ t.integer "position"
469
+ t.string "ancestry"
470
+ t.datetime "created_at"
471
+ t.datetime "updated_at"
472
+ t.string "slug"
473
+ end
474
+
475
+ add_index "cms_section_nodes", ["ancestry"], name: "index_cms_section_nodes_on_ancestry"
476
+ add_index "cms_section_nodes", ["node_type"], name: "index_cms_section_nodes_on_node_type"
477
+
478
+ create_table "cms_sections", force: true do |t|
479
+ t.string "name"
480
+ t.string "path"
481
+ t.boolean "root", default: false
482
+ t.boolean "hidden", default: false
483
+ t.datetime "created_at"
484
+ t.datetime "updated_at"
485
+ end
486
+
487
+ add_index "cms_sections", ["path"], name: "index_cms_sections_on_path"
488
+
489
+ create_table "cms_sites", force: true do |t|
490
+ t.string "name"
491
+ t.string "domain"
492
+ t.boolean "the_default"
493
+ t.datetime "created_at"
494
+ t.datetime "updated_at"
495
+ end
496
+
497
+ create_table "cms_taggings", force: true do |t|
498
+ t.integer "tag_id"
499
+ t.integer "taggable_id"
500
+ t.string "taggable_type"
501
+ t.integer "taggable_version"
502
+ t.datetime "created_at"
503
+ t.datetime "updated_at"
504
+ end
505
+
506
+ create_table "cms_tags", force: true do |t|
507
+ t.string "name"
508
+ t.datetime "created_at"
509
+ t.datetime "updated_at"
510
+ end
511
+
512
+ create_table "cms_tasks", force: true do |t|
513
+ t.integer "assigned_by_id"
514
+ t.integer "assigned_to_id"
515
+ t.integer "page_id"
516
+ t.text "comment"
517
+ t.date "due_date"
518
+ t.datetime "completed_at"
519
+ t.datetime "created_at"
520
+ t.datetime "updated_at"
521
+ end
522
+
523
+ add_index "cms_tasks", ["assigned_to_id"], name: "index_cms_tasks_on_assigned_to_id"
524
+ add_index "cms_tasks", ["completed_at"], name: "index_cms_tasks_on_completed_at"
525
+ add_index "cms_tasks", ["page_id"], name: "index_cms_tasks_on_page_id"
526
+
527
+ create_table "cms_user_group_memberships", force: true do |t|
528
+ t.integer "user_id"
529
+ t.integer "group_id"
530
+ end
531
+
532
+ add_index "cms_user_group_memberships", ["group_id"], name: "index_cms_user_group_memberships_on_group_id"
533
+ add_index "cms_user_group_memberships", ["user_id"], name: "index_cms_user_group_memberships_on_user_id"
534
+
535
+ create_table "cms_users", force: true do |t|
536
+ t.string "login", limit: 40
537
+ t.string "first_name", limit: 40
538
+ t.string "last_name", limit: 40
539
+ t.string "email", limit: 40
540
+ t.string "salt", limit: 40
541
+ t.datetime "created_at"
542
+ t.datetime "updated_at"
543
+ t.datetime "expires_at"
544
+ t.datetime "remember_created_at"
545
+ t.string "reset_password_token"
546
+ t.string "encrypted_password", default: "", null: false
547
+ t.datetime "reset_password_sent_at"
548
+ t.string "type", default: "Cms::User"
549
+ t.string "source"
550
+ t.text "external_data"
551
+ end
552
+
553
+ add_index "cms_users", ["email"], name: "index_cms_users_on_email", unique: true
554
+ add_index "cms_users", ["expires_at"], name: "index_cms_users_on_expires_at"
555
+ add_index "cms_users", ["login"], name: "index_cms_users_on_login", unique: true
556
+ add_index "cms_users", ["reset_password_token"], name: "index_cms_users_on_reset_password_token", unique: true
557
+
558
+ end