tb_cms 1.3.0 → 1.3.6
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.
- checksums.yaml +4 -4
- data/README.md +0 -9
- data/app/assets/javascripts/admin/cms/application.js +1 -1
- data/app/assets/javascripts/admin/cms/menu_items.js +14 -8
- data/app/assets/javascripts/admin/cms/pages.js +9 -7
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/cms/sitemaps_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +4 -4
- data/app/helpers/cms/application_helper.rb +4 -4
- data/app/models/spud_menu_item.rb +3 -3
- data/app/models/spud_page.rb +22 -10
- data/app/models/spud_page_partial.rb +3 -20
- data/app/models/spud_snippet.rb +1 -4
- data/app/views/admin/menu_items/index.html.erb +2 -2
- data/app/views/admin/pages/_form.html.erb +2 -2
- data/app/views/admin/pages/_page_partials_form.html.erb +1 -1
- data/app/views/admin/pages/_page_row.html.erb +1 -1
- data/app/views/admin/pages/show.html.erb +12 -15
- data/app/views/pages/show.html.erb +2 -2
- data/db/migrate/20120101192412_create_spud_pages.rb +1 -1
- data/db/migrate/20120101193138_create_spud_menus.rb +1 -1
- data/db/migrate/20120101193255_create_spud_menu_items.rb +1 -1
- data/db/migrate/20120101194124_create_spud_templates.rb +1 -1
- data/db/migrate/20120103034659_create_spud_page_partials.rb +1 -1
- data/db/migrate/20120104194032_add_visibility_to_spud_pages.rb +1 -1
- data/db/migrate/20120107181337_add_menu_name_to_spud_menu_items.rb +1 -1
- data/db/migrate/20120111134754_add_use_custom_url_name_to_spud_pages.rb +1 -1
- data/db/migrate/20120118141852_add_notes_to_spud_pages.rb +1 -1
- data/db/migrate/20120126232428_add_menu_id_to_spud_menu_items.rb +1 -1
- data/db/migrate/20120128163601_add_classes_to_spud_menu_items.rb +1 -1
- data/db/migrate/20120329132314_add_site_id_to_spud_pages.rb +1 -1
- data/db/migrate/20120329132322_add_site_id_to_spud_templates.rb +1 -1
- data/db/migrate/20120329132330_add_site_id_to_spud_menus.rb +1 -1
- data/db/migrate/20120510195151_create_spud_page_partial_revisions.rb +1 -1
- data/db/migrate/20120911190030_add_symbol_name_to_spud_page_partials.rb +1 -1
- data/db/migrate/20120912121313_modify_site_id_for_spud_pages.rb +1 -1
- data/db/migrate/20121016233715_add_content_processed_to_spud_page_partials.rb +1 -1
- data/db/migrate/20121112151110_add_layout_to_spud_pages.rb +1 -1
- data/db/migrate/20121119025608_create_spud_snippets.rb +1 -1
- data/db/migrate/20150108162839_remove_site_id_from_cms_tables.rb +1 -1
- data/db/migrate/20150622161403_add_title_tag_to_spud_page.rb +1 -1
- data/lib/spud_cms/engine.rb +4 -15
- data/lib/spud_cms/template_parser.rb +2 -2
- data/lib/spud_cms/version.rb +1 -1
- data/lib/tb_cms.rb +0 -1
- data/spec/controllers/admin/menu_items_controller_spec.rb +18 -18
- data/spec/controllers/admin/menus_controller_spec.rb +9 -9
- data/spec/controllers/admin/pages_controller_spec.rb +9 -9
- data/spec/controllers/pages_controller_spec.rb +5 -5
- data/spec/dummy/app/controllers/application_controller.rb +1 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/database.yml +3 -6
- data/spec/dummy/config/environments/development.rb +2 -2
- data/spec/dummy/db/migrate/20141231214446_create_spud_admin_permissions.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214447_create_spud_users.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214448_add_time_zone_to_spud_user.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214449_add_scope_to_spud_admin_permissions.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214450_create_spud_user_settings.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214451_create_spud_roles.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214452_create_spud_permissions.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214453_create_spud_role_permissions.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214454_drop_spud_admin_permissions.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20141231214455_create_spud_permalinks.tb_permalinks.rb +1 -1
- data/spec/dummy/db/migrate/20141231214456_add_site_id_to_spud_permalinks.tb_permalinks.rb +1 -1
- data/spec/dummy/db/migrate/20141231214457_modify_site_id_for_spud_permalinks.tb_permalinks.rb +1 -1
- data/spec/dummy/db/migrate/20141231214459_create_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214460_create_spud_menus.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214461_create_spud_menu_items.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214462_create_spud_templates.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214463_create_spud_page_partials.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214464_add_visibility_to_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214465_add_menu_name_to_spud_menu_items.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214466_add_use_custom_url_name_to_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214467_add_notes_to_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214468_add_menu_id_to_spud_menu_items.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214469_add_classes_to_spud_menu_items.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214470_add_site_id_to_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214471_add_site_id_to_spud_templates.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214472_add_site_id_to_spud_menus.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214473_create_spud_page_partial_revisions.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214474_add_symbol_name_to_spud_page_partials.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214475_modify_site_id_for_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214476_add_content_processed_to_spud_page_partials.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214477_add_layout_to_spud_pages.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20141231214479_create_spud_snippets.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20150108164814_remove_site_id_from_cms_tables.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20150911185843_add_requires_password_change_to_spud_users.tb_core.rb +1 -1
- data/spec/dummy/db/migrate/20150911185844_add_title_tag_to_spud_page.tb_cms.rb +1 -1
- data/spec/dummy/db/migrate/20160215180157_create_tb_redirects.tb_redirects.rb +1 -1
- data/spec/dummy/db/schema.rb +108 -115
- data/spec/helpers/cms/application_helper_spec.rb +37 -37
- data/spec/models/spud_menu_item_spec.rb +4 -4
- data/spec/models/spud_page_partial_spec.rb +5 -5
- data/spec/models/spud_page_spec.rb +20 -12
- data/spec/rails_helper.rb +1 -1
- metadata +70 -96
- data/db/migrate/20121112212113_create_spud_page_liquid_tags.rb +0 -11
- data/db/migrate/20121119030136_change_liquid_tags_to_polymorphic.rb +0 -17
- data/db/migrate/20140110142037_drop_spud_page_liquid_tags.rb +0 -31
- data/lib/spud_cms/liquid_snippet.rb +0 -27
- data/spec/dummy/db/migrate/20141231214458_create_tb_liquid_spud_liquid_tags.tb_liquid.rb +0 -13
- data/spec/dummy/db/migrate/20141231214478_create_spud_page_liquid_tags.tb_cms.rb +0 -12
- data/spec/dummy/db/migrate/20141231214480_change_liquid_tags_to_polymorphic.tb_cms.rb +0 -18
- data/spec/dummy/db/migrate/20141231214481_drop_spud_page_liquid_tags.tb_cms.rb +0 -30
|
@@ -4,21 +4,21 @@ describe PagesController, type: :controller do
|
|
|
4
4
|
describe 'show' do
|
|
5
5
|
|
|
6
6
|
it 'should render a page' do
|
|
7
|
-
page =
|
|
7
|
+
page = FactoryBot.create(:spud_page)
|
|
8
8
|
get :show, params: { id: page.url_name }
|
|
9
9
|
expect(assigns(:layout)).to render_template(layout: "layouts/#{Spud::Cms.default_page_layout}")
|
|
10
10
|
expect(response).to be_success
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
it 'should render home page if id is blank' do
|
|
14
|
-
page =
|
|
14
|
+
page = FactoryBot.create(:spud_page, name: 'home')
|
|
15
15
|
get :show
|
|
16
16
|
expect(assigns(:page)).to eq(page)
|
|
17
17
|
expect(response).to be_success
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
it 'should redirect to new page url from old page url if it was changed' do
|
|
21
|
-
page =
|
|
21
|
+
page = FactoryBot.create(:spud_page, name: 'about', url_name: 'about')
|
|
22
22
|
page.update(url_name: 'about-us')
|
|
23
23
|
page.save
|
|
24
24
|
get :show, params: { id: 'about' }
|
|
@@ -27,7 +27,7 @@ describe PagesController, type: :controller do
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
it 'should not allow access to private pages when logged out' do
|
|
30
|
-
page =
|
|
30
|
+
page = FactoryBot.create(:spud_page, name: 'about', visibility: 1)
|
|
31
31
|
|
|
32
32
|
get :show, params: { id: 'about' }
|
|
33
33
|
expect(response).to redirect_to login_path(return_to: '/about')
|
|
@@ -43,7 +43,7 @@ describe PagesController, type: :controller do
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
it 'should allow access to private pages when logged in' do
|
|
46
|
-
page =
|
|
46
|
+
page = FactoryBot.create(:spud_page, name: 'about', visibility: 1)
|
|
47
47
|
|
|
48
48
|
get :show, params: { id: 'about' }
|
|
49
49
|
expect(response).to be_success
|
|
@@ -4,12 +4,9 @@
|
|
|
4
4
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
5
|
# gem 'sqlite3'
|
|
6
6
|
development:
|
|
7
|
-
adapter:
|
|
7
|
+
adapter: postgresql
|
|
8
8
|
database: spud_cms_development
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
11
10
|
test:
|
|
12
|
-
adapter:
|
|
11
|
+
adapter: postgresql
|
|
13
12
|
database: spud_cms_test
|
|
14
|
-
username: root
|
|
15
|
-
|
|
@@ -23,11 +23,11 @@ Dummy::Application.configure do
|
|
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
|
24
24
|
|
|
25
25
|
# Raise exception on mass assignment protection for Active Record models
|
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
|
26
|
+
# config.active_record.mass_assignment_sanitizer = :strict
|
|
27
27
|
|
|
28
28
|
# Log the query plan for queries taking more than this (works
|
|
29
29
|
# with SQLite, MySQL, and PostgreSQL)
|
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
30
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
31
31
|
|
|
32
32
|
# Do not compress assets
|
|
33
33
|
config.assets.compress = false
|
|
@@ -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 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 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_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'
|
data/spec/dummy/db/migrate/20141231214457_modify_site_id_for_spud_permalinks.tb_permalinks.rb
CHANGED
|
@@ -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 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 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 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 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
|
data/spec/dummy/db/migrate/20141231214476_add_content_processed_to_spud_page_partials.tb_cms.rb
CHANGED
|
@@ -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 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
|
data/spec/dummy/db/migrate/20150911185843_add_requires_password_change_to_spud_users.tb_core.rb
CHANGED
|
@@ -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
|
data/spec/dummy/db/schema.rb
CHANGED
|
@@ -12,173 +12,166 @@
|
|
|
12
12
|
|
|
13
13
|
ActiveRecord::Schema.define(version: 20160215180157) do
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
t.string
|
|
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"
|
|
20
25
|
t.datetime "created_at"
|
|
21
26
|
t.datetime "updated_at"
|
|
22
|
-
t.
|
|
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 "
|
|
26
|
-
t.string
|
|
27
|
-
t.
|
|
28
|
-
t.integer "item_type"
|
|
29
|
-
t.integer "spud_page_id"
|
|
30
|
-
t.integer "menu_order", default: 0
|
|
31
|
-
t.string "url"
|
|
35
|
+
create_table "spud_menus", id: :serial, force: :cascade do |t|
|
|
36
|
+
t.string "name"
|
|
37
|
+
t.text "description"
|
|
32
38
|
t.datetime "created_at"
|
|
33
39
|
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
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
create_table "
|
|
43
|
-
t.string
|
|
44
|
-
t.text
|
|
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"
|
|
45
47
|
t.datetime "created_at"
|
|
46
48
|
t.datetime "updated_at"
|
|
49
|
+
t.index ["spud_page_id", "name"], name: "revision_idx"
|
|
47
50
|
end
|
|
48
51
|
|
|
49
|
-
create_table "
|
|
50
|
-
t.
|
|
51
|
-
t.
|
|
52
|
-
t.
|
|
53
|
-
t.
|
|
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"
|
|
54
57
|
t.datetime "created_at"
|
|
55
58
|
t.datetime "updated_at"
|
|
56
|
-
t.
|
|
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 "
|
|
60
|
-
t.
|
|
61
|
-
t.string
|
|
62
|
-
t.text "content", limit: 65535
|
|
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: 65535
|
|
68
|
-
t.index ["spud_page_id"], name: "index_spud_page_partials_on_spud_page_id", using: :btree
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
create_table "spud_pages", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
|
|
72
|
-
t.string "name"
|
|
73
|
-
t.string "url_name"
|
|
64
|
+
create_table "spud_pages", id: :serial, force: :cascade do |t|
|
|
65
|
+
t.string "name"
|
|
66
|
+
t.string "url_name"
|
|
74
67
|
t.datetime "publish_at"
|
|
75
|
-
t.integer
|
|
76
|
-
t.integer
|
|
77
|
-
t.string
|
|
78
|
-
t.integer
|
|
79
|
-
t.text
|
|
80
|
-
t.string
|
|
81
|
-
t.integer
|
|
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"
|
|
82
75
|
t.datetime "created_at"
|
|
83
76
|
t.datetime "updated_at"
|
|
84
|
-
t.integer
|
|
85
|
-
t.boolean
|
|
86
|
-
t.boolean
|
|
87
|
-
t.text
|
|
88
|
-
t.string
|
|
89
|
-
t.string
|
|
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"
|
|
90
83
|
end
|
|
91
84
|
|
|
92
|
-
create_table "spud_permalinks",
|
|
93
|
-
t.string
|
|
94
|
-
t.string
|
|
95
|
-
t.integer
|
|
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"
|
|
96
89
|
t.datetime "created_at"
|
|
97
90
|
t.datetime "updated_at"
|
|
98
|
-
t.integer
|
|
99
|
-
t.index ["attachment_type", "attachment_id"], name: "idx_permalink_attachment"
|
|
100
|
-
t.index ["site_id"], name: "idx_permalinks_site_id"
|
|
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"
|
|
101
94
|
end
|
|
102
95
|
|
|
103
|
-
create_table "spud_permissions",
|
|
104
|
-
t.string
|
|
105
|
-
t.string
|
|
96
|
+
create_table "spud_permissions", id: :serial, force: :cascade do |t|
|
|
97
|
+
t.string "name", null: false
|
|
98
|
+
t.string "tag", null: false
|
|
106
99
|
t.datetime "created_at"
|
|
107
100
|
t.datetime "updated_at"
|
|
108
|
-
t.index ["tag"], name: "index_spud_permissions_on_tag", unique: true
|
|
101
|
+
t.index ["tag"], name: "index_spud_permissions_on_tag", unique: true
|
|
109
102
|
end
|
|
110
103
|
|
|
111
|
-
create_table "spud_role_permissions",
|
|
112
|
-
t.integer
|
|
113
|
-
t.string
|
|
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
|
|
114
107
|
t.datetime "created_at"
|
|
115
108
|
t.datetime "updated_at"
|
|
116
|
-
t.index ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag"
|
|
117
|
-
t.index ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id"
|
|
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"
|
|
118
111
|
end
|
|
119
112
|
|
|
120
|
-
create_table "spud_roles",
|
|
121
|
-
t.string
|
|
113
|
+
create_table "spud_roles", id: :serial, force: :cascade do |t|
|
|
114
|
+
t.string "name"
|
|
122
115
|
t.datetime "created_at"
|
|
123
116
|
t.datetime "updated_at"
|
|
124
117
|
end
|
|
125
118
|
|
|
126
|
-
create_table "spud_snippets",
|
|
127
|
-
t.string
|
|
128
|
-
t.text
|
|
129
|
-
t.string
|
|
130
|
-
t.text
|
|
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"
|
|
131
124
|
t.datetime "created_at"
|
|
132
125
|
t.datetime "updated_at"
|
|
133
|
-
t.index ["name"], name: "index_spud_snippets_on_name"
|
|
126
|
+
t.index ["name"], name: "index_spud_snippets_on_name"
|
|
134
127
|
end
|
|
135
128
|
|
|
136
|
-
create_table "spud_user_settings",
|
|
137
|
-
t.integer
|
|
138
|
-
t.string
|
|
139
|
-
t.string
|
|
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"
|
|
140
133
|
t.datetime "created_at"
|
|
141
134
|
t.datetime "updated_at"
|
|
142
135
|
end
|
|
143
136
|
|
|
144
|
-
create_table "spud_users",
|
|
145
|
-
t.string
|
|
146
|
-
t.string
|
|
147
|
-
t.boolean
|
|
148
|
-
t.string
|
|
149
|
-
t.string
|
|
150
|
-
t.string
|
|
151
|
-
t.string
|
|
152
|
-
t.string
|
|
153
|
-
t.string
|
|
154
|
-
t.string
|
|
155
|
-
t.integer
|
|
156
|
-
t.integer
|
|
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
|
|
157
150
|
t.datetime "last_request_at"
|
|
158
151
|
t.datetime "current_login_at"
|
|
159
152
|
t.datetime "last_login_at"
|
|
160
|
-
t.string
|
|
161
|
-
t.string
|
|
153
|
+
t.string "current_login_ip"
|
|
154
|
+
t.string "last_login_ip"
|
|
162
155
|
t.datetime "created_at"
|
|
163
156
|
t.datetime "updated_at"
|
|
164
|
-
t.string
|
|
165
|
-
t.integer
|
|
166
|
-
t.boolean
|
|
167
|
-
t.index ["email"], name: "index_spud_users_on_email"
|
|
168
|
-
t.index ["login"], name: "index_spud_users_on_login"
|
|
169
|
-
t.index ["spud_role_id"], name: "index_spud_users_on_spud_role_id"
|
|
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"
|
|
170
163
|
end
|
|
171
164
|
|
|
172
|
-
create_table "tb_redirects",
|
|
173
|
-
t.string
|
|
174
|
-
t.integer
|
|
175
|
-
t.string
|
|
176
|
-
t.string
|
|
177
|
-
t.string
|
|
178
|
-
t.datetime "created_at",
|
|
179
|
-
t.datetime "updated_at",
|
|
180
|
-
t.index ["owner_type", "owner_id"], name: "index_tb_redirects_on_owner_type_and_owner_id"
|
|
181
|
-
t.index ["source"], name: "index_tb_redirects_on_source", unique: true
|
|
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
|