tb_cms 1.3.beta1 → 1.3.5

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 (98) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +0 -9
  3. data/app/assets/javascripts/admin/cms/menu_items.js +12 -6
  4. data/app/assets/javascripts/admin/cms/pages.js +3 -0
  5. data/app/controllers/cms/sitemaps_controller.rb +1 -1
  6. data/app/controllers/pages_controller.rb +4 -4
  7. data/app/helpers/cms/application_helper.rb +4 -4
  8. data/app/models/spud_menu_item.rb +3 -3
  9. data/app/models/spud_page.rb +21 -10
  10. data/app/models/spud_page_partial.rb +3 -20
  11. data/app/models/spud_snippet.rb +1 -4
  12. data/app/views/admin/pages/show.html.erb +12 -15
  13. data/app/views/pages/show.html.erb +2 -2
  14. data/db/migrate/20120101192412_create_spud_pages.rb +1 -1
  15. data/db/migrate/20120101193138_create_spud_menus.rb +1 -1
  16. data/db/migrate/20120101193255_create_spud_menu_items.rb +1 -1
  17. data/db/migrate/20120101194124_create_spud_templates.rb +1 -1
  18. data/db/migrate/20120103034659_create_spud_page_partials.rb +1 -1
  19. data/db/migrate/20120104194032_add_visibility_to_spud_pages.rb +1 -1
  20. data/db/migrate/20120107181337_add_menu_name_to_spud_menu_items.rb +1 -1
  21. data/db/migrate/20120111134754_add_use_custom_url_name_to_spud_pages.rb +1 -1
  22. data/db/migrate/20120118141852_add_notes_to_spud_pages.rb +1 -1
  23. data/db/migrate/20120126232428_add_menu_id_to_spud_menu_items.rb +1 -1
  24. data/db/migrate/20120128163601_add_classes_to_spud_menu_items.rb +1 -1
  25. data/db/migrate/20120329132314_add_site_id_to_spud_pages.rb +1 -1
  26. data/db/migrate/20120329132322_add_site_id_to_spud_templates.rb +1 -1
  27. data/db/migrate/20120329132330_add_site_id_to_spud_menus.rb +1 -1
  28. data/db/migrate/20120510195151_create_spud_page_partial_revisions.rb +1 -1
  29. data/db/migrate/20120911190030_add_symbol_name_to_spud_page_partials.rb +1 -1
  30. data/db/migrate/20120912121313_modify_site_id_for_spud_pages.rb +1 -1
  31. data/db/migrate/20121016233715_add_content_processed_to_spud_page_partials.rb +1 -1
  32. data/db/migrate/20121112151110_add_layout_to_spud_pages.rb +1 -1
  33. data/db/migrate/20121119025608_create_spud_snippets.rb +1 -1
  34. data/db/migrate/20150108162839_remove_site_id_from_cms_tables.rb +1 -1
  35. data/db/migrate/20150622161403_add_title_tag_to_spud_page.rb +1 -1
  36. data/lib/spud_cms/engine.rb +4 -15
  37. data/lib/spud_cms/template_parser.rb +2 -2
  38. data/lib/spud_cms/version.rb +1 -1
  39. data/lib/tb_cms.rb +0 -1
  40. data/spec/controllers/admin/menu_items_controller_spec.rb +18 -18
  41. data/spec/controllers/admin/menus_controller_spec.rb +9 -9
  42. data/spec/controllers/admin/pages_controller_spec.rb +9 -9
  43. data/spec/controllers/pages_controller_spec.rb +5 -5
  44. data/spec/dummy/app/controllers/application_controller.rb +1 -1
  45. data/spec/dummy/config/application.rb +1 -1
  46. data/spec/dummy/config/database.yml +3 -6
  47. data/spec/dummy/config/environments/development.rb +2 -2
  48. data/spec/dummy/db/migrate/20141231214446_create_spud_admin_permissions.tb_core.rb +1 -1
  49. data/spec/dummy/db/migrate/20141231214447_create_spud_users.tb_core.rb +1 -1
  50. data/spec/dummy/db/migrate/20141231214448_add_time_zone_to_spud_user.tb_core.rb +1 -1
  51. data/spec/dummy/db/migrate/20141231214449_add_scope_to_spud_admin_permissions.tb_core.rb +1 -1
  52. data/spec/dummy/db/migrate/20141231214450_create_spud_user_settings.tb_core.rb +1 -1
  53. data/spec/dummy/db/migrate/20141231214451_create_spud_roles.tb_core.rb +1 -1
  54. data/spec/dummy/db/migrate/20141231214452_create_spud_permissions.tb_core.rb +1 -1
  55. data/spec/dummy/db/migrate/20141231214453_create_spud_role_permissions.tb_core.rb +1 -1
  56. data/spec/dummy/db/migrate/20141231214454_drop_spud_admin_permissions.tb_core.rb +1 -1
  57. data/spec/dummy/db/migrate/20141231214455_create_spud_permalinks.tb_permalinks.rb +1 -1
  58. data/spec/dummy/db/migrate/20141231214456_add_site_id_to_spud_permalinks.tb_permalinks.rb +1 -1
  59. data/spec/dummy/db/migrate/20141231214457_modify_site_id_for_spud_permalinks.tb_permalinks.rb +1 -1
  60. data/spec/dummy/db/migrate/20141231214459_create_spud_pages.tb_cms.rb +1 -1
  61. data/spec/dummy/db/migrate/20141231214460_create_spud_menus.tb_cms.rb +1 -1
  62. data/spec/dummy/db/migrate/20141231214461_create_spud_menu_items.tb_cms.rb +1 -1
  63. data/spec/dummy/db/migrate/20141231214462_create_spud_templates.tb_cms.rb +1 -1
  64. data/spec/dummy/db/migrate/20141231214463_create_spud_page_partials.tb_cms.rb +1 -1
  65. data/spec/dummy/db/migrate/20141231214464_add_visibility_to_spud_pages.tb_cms.rb +1 -1
  66. data/spec/dummy/db/migrate/20141231214465_add_menu_name_to_spud_menu_items.tb_cms.rb +1 -1
  67. data/spec/dummy/db/migrate/20141231214466_add_use_custom_url_name_to_spud_pages.tb_cms.rb +1 -1
  68. data/spec/dummy/db/migrate/20141231214467_add_notes_to_spud_pages.tb_cms.rb +1 -1
  69. data/spec/dummy/db/migrate/20141231214468_add_menu_id_to_spud_menu_items.tb_cms.rb +1 -1
  70. data/spec/dummy/db/migrate/20141231214469_add_classes_to_spud_menu_items.tb_cms.rb +1 -1
  71. data/spec/dummy/db/migrate/20141231214470_add_site_id_to_spud_pages.tb_cms.rb +1 -1
  72. data/spec/dummy/db/migrate/20141231214471_add_site_id_to_spud_templates.tb_cms.rb +1 -1
  73. data/spec/dummy/db/migrate/20141231214472_add_site_id_to_spud_menus.tb_cms.rb +1 -1
  74. data/spec/dummy/db/migrate/20141231214473_create_spud_page_partial_revisions.tb_cms.rb +1 -1
  75. data/spec/dummy/db/migrate/20141231214474_add_symbol_name_to_spud_page_partials.tb_cms.rb +1 -1
  76. data/spec/dummy/db/migrate/20141231214475_modify_site_id_for_spud_pages.tb_cms.rb +1 -1
  77. data/spec/dummy/db/migrate/20141231214476_add_content_processed_to_spud_page_partials.tb_cms.rb +1 -1
  78. data/spec/dummy/db/migrate/20141231214477_add_layout_to_spud_pages.tb_cms.rb +1 -1
  79. data/spec/dummy/db/migrate/20141231214479_create_spud_snippets.tb_cms.rb +1 -1
  80. data/spec/dummy/db/migrate/20150108164814_remove_site_id_from_cms_tables.tb_cms.rb +1 -1
  81. data/spec/dummy/db/migrate/20150911185843_add_requires_password_change_to_spud_users.tb_core.rb +1 -1
  82. data/spec/dummy/db/migrate/20150911185844_add_title_tag_to_spud_page.tb_cms.rb +1 -1
  83. data/spec/dummy/db/migrate/20160215180157_create_tb_redirects.tb_redirects.rb +1 -1
  84. data/spec/dummy/db/schema.rb +138 -145
  85. data/spec/helpers/cms/application_helper_spec.rb +37 -37
  86. data/spec/models/spud_menu_item_spec.rb +4 -4
  87. data/spec/models/spud_page_partial_spec.rb +5 -5
  88. data/spec/models/spud_page_spec.rb +20 -12
  89. data/spec/rails_helper.rb +1 -1
  90. metadata +68 -95
  91. data/db/migrate/20121112212113_create_spud_page_liquid_tags.rb +0 -11
  92. data/db/migrate/20121119030136_change_liquid_tags_to_polymorphic.rb +0 -17
  93. data/db/migrate/20140110142037_drop_spud_page_liquid_tags.rb +0 -31
  94. data/lib/spud_cms/liquid_snippet.rb +0 -27
  95. data/spec/dummy/db/migrate/20141231214458_create_tb_liquid_spud_liquid_tags.tb_liquid.rb +0 -13
  96. data/spec/dummy/db/migrate/20141231214478_create_spud_page_liquid_tags.tb_cms.rb +0 -12
  97. data/spec/dummy/db/migrate/20141231214480_change_liquid_tags_to_polymorphic.tb_cms.rb +0 -18
  98. data/spec/dummy/db/migrate/20141231214481_drop_spud_page_liquid_tags.tb_cms.rb +0 -30
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20111214161011)
2
- class CreateSpudAdminPermissions < ActiveRecord::Migration
2
+ class CreateSpudAdminPermissions < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_admin_permissions do |t|
5
5
  t.integer :user_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20111214161146)
2
- class CreateSpudUsers < ActiveRecord::Migration
2
+ class CreateSpudUsers < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_users do |t|
5
5
 
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20120327124229)
2
- class AddTimeZoneToSpudUser < ActiveRecord::Migration
2
+ class AddTimeZoneToSpudUser < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_users, :time_zone, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20120328235431)
2
- class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
2
+ class AddScopeToSpudAdminPermissions < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_admin_permissions, :scope, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20120329174000)
2
- class CreateSpudUserSettings < ActiveRecord::Migration
2
+ class CreateSpudUserSettings < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_user_settings do |t|
5
5
  t.integer :spud_user_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20130620143010)
2
- class CreateSpudRoles < ActiveRecord::Migration
2
+ class CreateSpudRoles < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_roles do |t|
5
5
  t.string :name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20130620143941)
2
- class CreateSpudPermissions < ActiveRecord::Migration
2
+ class CreateSpudPermissions < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_permissions do |t|
5
5
  t.string :name, null: false
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20130620151132)
2
- class CreateSpudRolePermissions < ActiveRecord::Migration
2
+ class CreateSpudRolePermissions < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_role_permissions do |t|
5
5
  t.integer :spud_role_id, null: false
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20130620163144)
2
- class DropSpudAdminPermissions < ActiveRecord::Migration
2
+ class DropSpudAdminPermissions < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  drop_table :spud_admin_permissions
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_permalinks (originally 20120306195503)
2
- class CreateSpudPermalinks < ActiveRecord::Migration
2
+ class CreateSpudPermalinks < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_permalinks do |t|
5
5
  t.string :url_name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_permalinks (originally 20120329135522)
2
- class AddSiteIdToSpudPermalinks < ActiveRecord::Migration
2
+ class AddSiteIdToSpudPermalinks < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_permalinks, :site_id, :integer
5
5
  add_index :spud_permalinks, :site_id, name: 'idx_permalinks_site_id'
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_permalinks (originally 20120912123700)
2
- class ModifySiteIdForSpudPermalinks < ActiveRecord::Migration
2
+ class ModifySiteIdForSpudPermalinks < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  change_column :spud_permalinks, :site_id, :integer, default: 0, null: false
5
5
  # SpudPermalink.where(:site_id => nil).each {|f| f.site_id = 0 ; f.save}
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120101192412)
2
- class CreateSpudPages < ActiveRecord::Migration
2
+ class CreateSpudPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_pages do |t|
5
5
  t.string :name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120101193138)
2
- class CreateSpudMenus < ActiveRecord::Migration
2
+ class CreateSpudMenus < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_menus do |t|
5
5
  t.string :name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120101193255)
2
- class CreateSpudMenuItems < ActiveRecord::Migration
2
+ class CreateSpudMenuItems < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_menu_items do |t|
5
5
  t.string :parent_type
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120101194124)
2
- class CreateSpudTemplates < ActiveRecord::Migration
2
+ class CreateSpudTemplates < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_templates do |t|
5
5
  t.string :name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120103034659)
2
- class CreateSpudPagePartials < ActiveRecord::Migration
2
+ class CreateSpudPagePartials < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_page_partials do |t|
5
5
  t.integer :spud_page_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120104194032)
2
- class AddVisibilityToSpudPages < ActiveRecord::Migration
2
+ class AddVisibilityToSpudPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_pages, :visibility, :integer, default: 0
5
5
  add_column :spud_pages, :published, :boolean, default: true
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120107181337)
2
- class AddMenuNameToSpudMenuItems < ActiveRecord::Migration
2
+ class AddMenuNameToSpudMenuItems < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_menu_items, :name, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120111134754)
2
- class AddUseCustomUrlNameToSpudPages < ActiveRecord::Migration
2
+ class AddUseCustomUrlNameToSpudPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_pages, :use_custom_url_name, :boolean, default: false
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120118141852)
2
- class AddNotesToSpudPages < ActiveRecord::Migration
2
+ class AddNotesToSpudPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_pages, :notes, :text
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120126232428)
2
- class AddMenuIdToSpudMenuItems < ActiveRecord::Migration
2
+ class AddMenuIdToSpudMenuItems < ActiveRecord::Migration[4.2]
3
3
 
4
4
  def change
5
5
  add_column :spud_menu_items, :spud_menu_id, :integer
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120128163601)
2
- class AddClassesToSpudMenuItems < ActiveRecord::Migration
2
+ class AddClassesToSpudMenuItems < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_menu_items, :classes, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120329132314)
2
- class AddSiteIdToSpudPages < ActiveRecord::Migration
2
+ class AddSiteIdToSpudPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_pages, :site_id, :integer
5
5
  add_index :spud_pages, :site_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120329132322)
2
- class AddSiteIdToSpudTemplates < ActiveRecord::Migration
2
+ class AddSiteIdToSpudTemplates < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_templates, :site_id, :integer
5
5
  add_index :spud_templates, :site_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120329132330)
2
- class AddSiteIdToSpudMenus < ActiveRecord::Migration
2
+ class AddSiteIdToSpudMenus < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_menus, :site_id, :integer
5
5
  add_index :spud_menus, :site_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120510195151)
2
- class CreateSpudPagePartialRevisions < ActiveRecord::Migration
2
+ class CreateSpudPagePartialRevisions < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_page_partial_revisions do |t|
5
5
  t.string :name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120911190030)
2
- class AddSymbolNameToSpudPagePartials < ActiveRecord::Migration
2
+ class AddSymbolNameToSpudPagePartials < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_page_partials, :symbol_name, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20120912121313)
2
- class ModifySiteIdForSpudPages < ActiveRecord::Migration
2
+ class ModifySiteIdForSpudPages < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  change_column :spud_pages, :site_id, :integer, default: 0, null: false
5
5
  change_column :spud_templates, :site_id, :integer, default: 0, null: false
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20121016233715)
2
- class AddContentProcessedToSpudPagePartials < ActiveRecord::Migration
2
+ class AddContentProcessedToSpudPagePartials < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_page_partials, :content_processed, :text
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20121112151110)
2
- class AddLayoutToSpudPages < ActiveRecord::Migration
2
+ class AddLayoutToSpudPages < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_pages, :layout, :string
5
5
 
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20121119025608)
2
- class CreateSpudSnippets < ActiveRecord::Migration
2
+ class CreateSpudSnippets < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :spud_snippets do |t|
5
5
  t.string :name
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20150108162839)
2
- class RemoveSiteIdFromCmsTables < ActiveRecord::Migration
2
+ class RemoveSiteIdFromCmsTables < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  remove_column :spud_menus, :site_id
5
5
  remove_column :spud_pages, :site_id
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_core (originally 20150610143438)
2
- class AddRequiresPasswordChangeToSpudUsers < ActiveRecord::Migration
2
+ class AddRequiresPasswordChangeToSpudUsers < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_users, :requires_password_change, :boolean, default: false
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_cms (originally 20150622161403)
2
- class AddTitleTagToSpudPage < ActiveRecord::Migration
2
+ class AddTitleTagToSpudPage < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  add_column :spud_pages, :page_title, :string
5
5
  end
@@ -1,5 +1,5 @@
1
1
  # This migration comes from tb_redirects (originally 20160211162513)
2
- class CreateTbRedirects < ActiveRecord::Migration
2
+ class CreateTbRedirects < ActiveRecord::Migration[4.2]
3
3
  def change
4
4
  create_table :tb_redirects do |t|
5
5
  t.string :owner_type
@@ -10,175 +10,168 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20_160_215_180_157) do
14
-
15
- create_table 'spud_liquid_tags', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
16
- t.integer 'attachment_id'
17
- t.string 'attachment_type'
18
- t.string 'tag_name'
19
- t.string 'value'
20
- t.datetime 'created_at'
21
- t.datetime 'updated_at'
22
- t.index ['tag_name', 'value'], name: 'index_spud_liquid_tags_on_tag_name_and_value', using: :btree
13
+ ActiveRecord::Schema.define(version: 20160215180157) do
14
+
15
+ # These are extensions that must be enabled in order to support this database
16
+ enable_extension "plpgsql"
17
+
18
+ create_table "spud_menu_items", id: :serial, force: :cascade do |t|
19
+ t.string "parent_type"
20
+ t.integer "parent_id"
21
+ t.integer "item_type"
22
+ t.integer "spud_page_id"
23
+ t.integer "menu_order", default: 0
24
+ t.string "url"
25
+ t.datetime "created_at"
26
+ t.datetime "updated_at"
27
+ t.string "name"
28
+ t.integer "spud_menu_id"
29
+ t.string "classes"
30
+ t.index ["menu_order"], name: "index_spud_menu_items_on_menu_order"
31
+ t.index ["parent_type", "parent_id"], name: "index_spud_menu_items_on_parent_type_and_parent_id"
32
+ t.index ["spud_menu_id"], name: "index_spud_menu_items_on_spud_menu_id"
23
33
  end
24
34
 
25
- create_table 'spud_menu_items', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
26
- t.string 'parent_type'
27
- t.integer 'parent_id'
28
- t.integer 'item_type'
29
- t.integer 'spud_page_id'
30
- t.integer 'menu_order', default: 0
31
- t.string 'url'
32
- t.datetime 'created_at'
33
- t.datetime 'updated_at'
34
- t.string 'name'
35
- t.integer 'spud_menu_id'
36
- t.string 'classes'
37
- t.index ['menu_order'], name: 'index_spud_menu_items_on_menu_order', using: :btree
38
- t.index ['parent_type', 'parent_id'], name: 'index_spud_menu_items_on_parent_type_and_parent_id', using: :btree
39
- t.index ['spud_menu_id'], name: 'index_spud_menu_items_on_spud_menu_id', using: :btree
35
+ create_table "spud_menus", id: :serial, force: :cascade do |t|
36
+ t.string "name"
37
+ t.text "description"
38
+ t.datetime "created_at"
39
+ t.datetime "updated_at"
40
40
  end
41
41
 
42
- create_table 'spud_menus', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
43
- t.string 'name'
44
- t.text 'description', limit: 65_535
45
- t.datetime 'created_at'
46
- t.datetime 'updated_at'
42
+ create_table "spud_page_partial_revisions", id: :serial, force: :cascade do |t|
43
+ t.string "name"
44
+ t.text "content"
45
+ t.string "format"
46
+ t.integer "spud_page_id"
47
+ t.datetime "created_at"
48
+ t.datetime "updated_at"
49
+ t.index ["spud_page_id", "name"], name: "revision_idx"
47
50
  end
48
51
 
49
- create_table 'spud_page_partial_revisions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
50
- t.string 'name'
51
- t.text 'content', limit: 65_535
52
- t.string 'format'
53
- t.integer 'spud_page_id'
54
- t.datetime 'created_at'
55
- t.datetime 'updated_at'
56
- t.index ['spud_page_id', 'name'], name: 'revision_idx', using: :btree
52
+ create_table "spud_page_partials", id: :serial, force: :cascade do |t|
53
+ t.integer "spud_page_id"
54
+ t.string "name"
55
+ t.text "content"
56
+ t.string "format"
57
+ t.datetime "created_at"
58
+ t.datetime "updated_at"
59
+ t.string "symbol_name"
60
+ t.text "content_processed"
61
+ t.index ["spud_page_id"], name: "index_spud_page_partials_on_spud_page_id"
57
62
  end
58
63
 
59
- create_table 'spud_page_partials', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
60
- t.integer 'spud_page_id'
61
- t.string 'name'
62
- t.text 'content', limit: 65_535
63
- t.string 'format'
64
- t.datetime 'created_at'
65
- t.datetime 'updated_at'
66
- t.string 'symbol_name'
67
- t.text 'content_processed', limit: 65_535
68
- t.index ['spud_page_id'], name: 'index_spud_page_partials_on_spud_page_id', using: :btree
64
+ create_table "spud_pages", id: :serial, force: :cascade do |t|
65
+ t.string "name"
66
+ t.string "url_name"
67
+ t.datetime "publish_at"
68
+ t.integer "created_by"
69
+ t.integer "updated_by"
70
+ t.string "format", default: "html"
71
+ t.integer "spud_page_id"
72
+ t.text "meta_description"
73
+ t.string "meta_keywords"
74
+ t.integer "page_order"
75
+ t.datetime "created_at"
76
+ t.datetime "updated_at"
77
+ t.integer "visibility", default: 0
78
+ t.boolean "published", default: true
79
+ t.boolean "use_custom_url_name", default: false
80
+ t.text "notes"
81
+ t.string "layout"
82
+ t.string "page_title"
69
83
  end
70
84
 
71
- create_table 'spud_pages', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
72
- t.string 'name'
73
- t.string 'url_name'
74
- t.datetime 'publish_at'
75
- t.integer 'created_by'
76
- t.integer 'updated_by'
77
- t.string 'format', default: 'html'
78
- t.integer 'spud_page_id'
79
- t.text 'meta_description', limit: 65_535
80
- t.string 'meta_keywords'
81
- t.integer 'page_order'
82
- t.datetime 'created_at'
83
- t.datetime 'updated_at'
84
- t.integer 'visibility', default: 0
85
- t.boolean 'published', default: true
86
- t.boolean 'use_custom_url_name', default: false
87
- t.text 'notes', limit: 65_535
88
- t.string 'layout'
89
- t.string 'page_title'
85
+ create_table "spud_permalinks", id: :serial, force: :cascade do |t|
86
+ t.string "url_name"
87
+ t.string "attachment_type"
88
+ t.integer "attachment_id"
89
+ t.datetime "created_at"
90
+ t.datetime "updated_at"
91
+ t.integer "site_id", default: 0, null: false
92
+ t.index ["attachment_type", "attachment_id"], name: "idx_permalink_attachment"
93
+ t.index ["site_id"], name: "idx_permalinks_site_id"
90
94
  end
91
95
 
92
- create_table 'spud_permalinks', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
93
- t.string 'url_name'
94
- t.string 'attachment_type'
95
- t.integer 'attachment_id'
96
- t.datetime 'created_at'
97
- t.datetime 'updated_at'
98
- t.integer 'site_id', default: 0, null: false
99
- t.index ['attachment_type', 'attachment_id'], name: 'idx_permalink_attachment', using: :btree
100
- t.index ['site_id'], name: 'idx_permalinks_site_id', using: :btree
96
+ create_table "spud_permissions", id: :serial, force: :cascade do |t|
97
+ t.string "name", null: false
98
+ t.string "tag", null: false
99
+ t.datetime "created_at"
100
+ t.datetime "updated_at"
101
+ t.index ["tag"], name: "index_spud_permissions_on_tag", unique: true
101
102
  end
102
103
 
103
- create_table 'spud_permissions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
104
- t.string 'name', null: false
105
- t.string 'tag', null: false
106
- t.datetime 'created_at'
107
- t.datetime 'updated_at'
108
- t.index ['tag'], name: 'index_spud_permissions_on_tag', unique: true, using: :btree
104
+ create_table "spud_role_permissions", id: :serial, force: :cascade do |t|
105
+ t.integer "spud_role_id", null: false
106
+ t.string "spud_permission_tag", null: false
107
+ t.datetime "created_at"
108
+ t.datetime "updated_at"
109
+ t.index ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag"
110
+ t.index ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id"
109
111
  end
110
112
 
111
- create_table 'spud_role_permissions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
112
- t.integer 'spud_role_id', null: false
113
- t.string 'spud_permission_tag', null: false
114
- t.datetime 'created_at'
115
- t.datetime 'updated_at'
116
- t.index ['spud_permission_tag'], name: 'index_spud_role_permissions_on_spud_permission_tag', using: :btree
117
- t.index ['spud_role_id'], name: 'index_spud_role_permissions_on_spud_role_id', using: :btree
113
+ create_table "spud_roles", id: :serial, force: :cascade do |t|
114
+ t.string "name"
115
+ t.datetime "created_at"
116
+ t.datetime "updated_at"
118
117
  end
119
118
 
120
- create_table 'spud_roles', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
121
- t.string 'name'
122
- t.datetime 'created_at'
123
- t.datetime 'updated_at'
119
+ create_table "spud_snippets", id: :serial, force: :cascade do |t|
120
+ t.string "name"
121
+ t.text "content"
122
+ t.string "format"
123
+ t.text "content_processed"
124
+ t.datetime "created_at"
125
+ t.datetime "updated_at"
126
+ t.index ["name"], name: "index_spud_snippets_on_name"
124
127
  end
125
128
 
126
- create_table 'spud_snippets', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
127
- t.string 'name'
128
- t.text 'content', limit: 65_535
129
- t.string 'format'
130
- t.text 'content_processed', limit: 65_535
131
- t.datetime 'created_at'
132
- t.datetime 'updated_at'
133
- t.index ['name'], name: 'index_spud_snippets_on_name', using: :btree
129
+ create_table "spud_user_settings", id: :serial, force: :cascade do |t|
130
+ t.integer "spud_user_id"
131
+ t.string "key"
132
+ t.string "value"
133
+ t.datetime "created_at"
134
+ t.datetime "updated_at"
134
135
  end
135
136
 
136
- create_table 'spud_user_settings', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
137
- t.integer 'spud_user_id'
138
- t.string 'key'
139
- t.string 'value'
140
- t.datetime 'created_at'
141
- t.datetime 'updated_at'
137
+ create_table "spud_users", id: :serial, force: :cascade do |t|
138
+ t.string "first_name"
139
+ t.string "last_name"
140
+ t.boolean "super_admin"
141
+ t.string "login", null: false
142
+ t.string "email", null: false
143
+ t.string "crypted_password", null: false
144
+ t.string "password_salt", null: false
145
+ t.string "persistence_token", null: false
146
+ t.string "single_access_token", null: false
147
+ t.string "perishable_token", null: false
148
+ t.integer "login_count", default: 0, null: false
149
+ t.integer "failed_login_count", default: 0, null: false
150
+ t.datetime "last_request_at"
151
+ t.datetime "current_login_at"
152
+ t.datetime "last_login_at"
153
+ t.string "current_login_ip"
154
+ t.string "last_login_ip"
155
+ t.datetime "created_at"
156
+ t.datetime "updated_at"
157
+ t.string "time_zone"
158
+ t.integer "spud_role_id"
159
+ t.boolean "requires_password_change", default: false
160
+ t.index ["email"], name: "index_spud_users_on_email"
161
+ t.index ["login"], name: "index_spud_users_on_login"
162
+ t.index ["spud_role_id"], name: "index_spud_users_on_spud_role_id"
142
163
  end
143
164
 
144
- create_table 'spud_users', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
145
- t.string 'first_name'
146
- t.string 'last_name'
147
- t.boolean 'super_admin'
148
- t.string 'login', null: false
149
- t.string 'email', null: false
150
- t.string 'crypted_password', null: false
151
- t.string 'password_salt', null: false
152
- t.string 'persistence_token', null: false
153
- t.string 'single_access_token', null: false
154
- t.string 'perishable_token', null: false
155
- t.integer 'login_count', default: 0, null: false
156
- t.integer 'failed_login_count', default: 0, null: false
157
- t.datetime 'last_request_at'
158
- t.datetime 'current_login_at'
159
- t.datetime 'last_login_at'
160
- t.string 'current_login_ip'
161
- t.string 'last_login_ip'
162
- t.datetime 'created_at'
163
- t.datetime 'updated_at'
164
- t.string 'time_zone'
165
- t.integer 'spud_role_id'
166
- t.boolean 'requires_password_change', default: false
167
- t.index ['email'], name: 'index_spud_users_on_email', using: :btree
168
- t.index ['login'], name: 'index_spud_users_on_login', using: :btree
169
- t.index ['spud_role_id'], name: 'index_spud_users_on_spud_role_id', using: :btree
170
- end
171
-
172
- create_table 'tb_redirects', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
173
- t.string 'owner_type'
174
- t.integer 'owner_id'
175
- t.string 'source', null: false
176
- t.string 'destination', null: false
177
- t.string 'created_by'
178
- t.datetime 'created_at', null: false
179
- t.datetime 'updated_at', null: false
180
- t.index ['owner_type', 'owner_id'], name: 'index_tb_redirects_on_owner_type_and_owner_id', using: :btree
181
- t.index ['source'], name: 'index_tb_redirects_on_source', unique: true, using: :btree
165
+ create_table "tb_redirects", id: :serial, force: :cascade do |t|
166
+ t.string "owner_type"
167
+ t.integer "owner_id"
168
+ t.string "source", null: false
169
+ t.string "destination", null: false
170
+ t.string "created_by"
171
+ t.datetime "created_at", null: false
172
+ t.datetime "updated_at", null: false
173
+ t.index ["owner_type", "owner_id"], name: "index_tb_redirects_on_owner_type_and_owner_id"
174
+ t.index ["source"], name: "index_tb_redirects_on_source", unique: true
182
175
  end
183
176
 
184
177
  end