tb_cms 1.3.beta1 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +0 -9
- data/app/assets/javascripts/admin/cms/menu_items.js +12 -6
- data/app/assets/javascripts/admin/cms/pages.js +3 -0
- 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 +21 -10
- data/app/models/spud_page_partial.rb +3 -20
- data/app/models/spud_snippet.rb +1 -4
- 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 +138 -145
- 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 +68 -95
- 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
@@ -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
@@ -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:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
t.string
|
20
|
-
t.
|
21
|
-
t.
|
22
|
-
t.
|
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
|
26
|
-
t.string
|
27
|
-
t.
|
28
|
-
t.
|
29
|
-
t.
|
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
|
43
|
-
t.string
|
44
|
-
t.text
|
45
|
-
t.
|
46
|
-
t.
|
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
|
50
|
-
t.
|
51
|
-
t.
|
52
|
-
t.
|
53
|
-
t.
|
54
|
-
t.datetime
|
55
|
-
t.datetime
|
56
|
-
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"
|
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
|
60
|
-
t.
|
61
|
-
t.string
|
62
|
-
t.
|
63
|
-
t.
|
64
|
-
t.
|
65
|
-
t.
|
66
|
-
t.
|
67
|
-
t.text
|
68
|
-
t.
|
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
|
72
|
-
t.string
|
73
|
-
t.string
|
74
|
-
t.
|
75
|
-
t.
|
76
|
-
t.
|
77
|
-
t.
|
78
|
-
t.
|
79
|
-
t.
|
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
|
93
|
-
t.string
|
94
|
-
t.string
|
95
|
-
t.
|
96
|
-
t.datetime
|
97
|
-
t.
|
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
|
104
|
-
t.
|
105
|
-
t.string
|
106
|
-
t.datetime
|
107
|
-
t.datetime
|
108
|
-
t.index [
|
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
|
112
|
-
t.
|
113
|
-
t.
|
114
|
-
t.datetime
|
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
|
121
|
-
t.string
|
122
|
-
t.
|
123
|
-
t.
|
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
|
127
|
-
t.
|
128
|
-
t.
|
129
|
-
t.string
|
130
|
-
t.
|
131
|
-
t.datetime
|
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
|
137
|
-
t.
|
138
|
-
t.string
|
139
|
-
t.
|
140
|
-
t.
|
141
|
-
t.
|
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
|
145
|
-
t.string
|
146
|
-
t.
|
147
|
-
t.
|
148
|
-
t.string
|
149
|
-
t.string
|
150
|
-
t.
|
151
|
-
t.
|
152
|
-
t.
|
153
|
-
t.
|
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
|