spec/dummy/db/schema.rb in tb_blog-1.3.3 vs spec/dummy/db/schema.rb in tb_blog-1.3.4

- old
+ new

@@ -9,149 +9,137 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160216153113) do +ActiveRecord::Schema.define(version: 20_161_020_155_452) do - create_table "spud_liquid_tags", force: :cascade do |t| - t.integer "attachment_id", limit: 4 - t.string "attachment_type", limit: 255 - t.string "tag_name", limit: 255 - t.string "value", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + create_table 'spud_liquid_tags', force: :cascade do |t| + t.integer 'attachment_id', limit: 4 + t.string 'attachment_type', limit: 255 + t.string 'tag_name', limit: 255 + t.string 'value', limit: 255 + t.datetime 'created_at' + t.datetime 'updated_at' end - add_index "spud_liquid_tags", ["tag_name", "value"], name: "index_spud_liquid_tags_on_tag_name_and_value", using: :btree + add_index 'spud_liquid_tags', ['tag_name', 'value'], name: 'index_spud_liquid_tags_on_tag_name_and_value', using: :btree - create_table "spud_permalinks", force: :cascade do |t| - t.string "url_name", limit: 255 - t.string "attachment_type", limit: 255 - t.integer "attachment_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" - t.integer "site_id", limit: 4, default: 0, null: false + create_table 'spud_permissions', force: :cascade do |t| + t.string 'name', limit: 255, null: false + t.string 'tag', limit: 255, null: false + t.datetime 'created_at' + t.datetime 'updated_at' end - add_index "spud_permalinks", ["attachment_type", "attachment_id"], name: "idx_permalink_attachment", using: :btree - add_index "spud_permalinks", ["site_id"], name: "idx_permalinks_site_id", using: :btree + add_index 'spud_permissions', ['tag'], name: 'index_spud_permissions_on_tag', unique: true, using: :btree - create_table "spud_permissions", force: :cascade do |t| - t.string "name", limit: 255, null: false - t.string "tag", limit: 255, null: false - t.datetime "created_at" - t.datetime "updated_at" + create_table 'spud_post_categories', force: :cascade do |t| + t.string 'name', limit: 255 + t.datetime 'created_at' + t.datetime 'updated_at' + t.string 'url_name', limit: 255 end - add_index "spud_permissions", ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree + add_index 'spud_post_categories', ['url_name'], name: 'index_spud_post_categories_on_url_name', using: :btree - create_table "spud_post_categories", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" - t.string "url_name", limit: 255 + create_table 'spud_post_categories_posts', force: :cascade do |t| + t.integer 'spud_post_id', limit: 4 + t.integer 'spud_post_category_id', limit: 4 end - add_index "spud_post_categories", ["url_name"], name: "index_spud_post_categories_on_url_name", using: :btree + add_index 'spud_post_categories_posts', ['spud_post_category_id'], name: 'index_spud_post_categories_posts_on_spud_post_category_id', using: :btree - create_table "spud_post_categories_posts", force: :cascade do |t| - t.integer "spud_post_id", limit: 4 - t.integer "spud_post_category_id", limit: 4 + create_table 'spud_posts', force: :cascade do |t| + t.integer 'spud_user_id', limit: 4 + t.string 'title', limit: 255 + t.text 'content', limit: 65_535 + t.boolean 'comments_enabled', default: false + t.boolean 'visible', default: true + t.datetime 'published_at' + t.datetime 'created_at' + t.datetime 'updated_at' + t.string 'url_name', limit: 255 + t.boolean 'is_news', default: false + t.string 'meta_keywords', limit: 255 + t.text 'meta_description', limit: 65_535 + t.string 'content_format', limit: 255, default: 'HTML' + t.text 'content_processed', limit: 65_535 + t.string 'blog_key', limit: 255 + t.string 'custom_author', limit: 255 + t.string 'identifier', limit: 255 end - add_index "spud_post_categories_posts", ["spud_post_category_id"], name: "index_spud_post_categories_posts_on_spud_post_category_id", using: :btree + add_index 'spud_posts', ['blog_key'], name: 'index_spud_posts_on_blog_key', using: :btree + add_index 'spud_posts', ['identifier'], name: 'index_spud_posts_on_identifier', unique: true, using: :btree + add_index 'spud_posts', ['is_news'], name: 'index_spud_posts_on_is_news', using: :btree + add_index 'spud_posts', ['spud_user_id'], name: 'index_spud_posts_on_spud_user_id', using: :btree + add_index 'spud_posts', ['url_name'], name: 'index_spud_posts_on_url_name', using: :btree + add_index 'spud_posts', ['visible'], name: 'index_spud_posts_on_visible', using: :btree - create_table "spud_posts", force: :cascade do |t| - t.integer "spud_user_id", limit: 4 - t.string "title", limit: 255 - t.text "content", limit: 65535 - t.boolean "comments_enabled", default: false - t.boolean "visible", default: true - t.datetime "published_at" - t.datetime "created_at" - t.datetime "updated_at" - t.string "url_name", limit: 255 - t.boolean "is_news", default: false - t.string "meta_keywords", limit: 255 - t.text "meta_description", limit: 65535 - t.string "content_format", limit: 255, default: "HTML" - t.text "content_processed", limit: 65535 - t.string "blog_key", limit: 255 - t.string "custom_author", limit: 255 - t.string "identifier", limit: 255 + create_table 'spud_role_permissions', force: :cascade do |t| + t.integer 'spud_role_id', limit: 4, null: false + t.string 'spud_permission_tag', limit: 255, null: false + t.datetime 'created_at' + t.datetime 'updated_at' end - add_index "spud_posts", ["blog_key"], name: "index_spud_posts_on_blog_key", using: :btree - add_index "spud_posts", ["identifier"], name: "index_spud_posts_on_identifier", unique: true, using: :btree - add_index "spud_posts", ["is_news"], name: "index_spud_posts_on_is_news", using: :btree - add_index "spud_posts", ["spud_user_id"], name: "index_spud_posts_on_spud_user_id", using: :btree - add_index "spud_posts", ["url_name"], name: "index_spud_posts_on_url_name", using: :btree - add_index "spud_posts", ["visible"], name: "index_spud_posts_on_visible", using: :btree + add_index 'spud_role_permissions', ['spud_permission_tag'], name: 'index_spud_role_permissions_on_spud_permission_tag', using: :btree + add_index 'spud_role_permissions', ['spud_role_id'], name: 'index_spud_role_permissions_on_spud_role_id', using: :btree - create_table "spud_role_permissions", force: :cascade do |t| - t.integer "spud_role_id", limit: 4, null: false - t.string "spud_permission_tag", limit: 255, null: false - t.datetime "created_at" - t.datetime "updated_at" + create_table 'spud_roles', force: :cascade do |t| + t.string 'name', limit: 255 + t.datetime 'created_at' + t.datetime 'updated_at' end - add_index "spud_role_permissions", ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree - add_index "spud_role_permissions", ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree - - create_table "spud_roles", force: :cascade do |t| - t.string "name", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + create_table 'spud_user_settings', force: :cascade do |t| + t.integer 'spud_user_id', limit: 4 + t.string 'key', limit: 255 + t.string 'value', limit: 255 + t.datetime 'created_at' + t.datetime 'updated_at' end - create_table "spud_user_settings", force: :cascade do |t| - t.integer "spud_user_id", limit: 4 - t.string "key", limit: 255 - t.string "value", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + create_table 'spud_users', force: :cascade do |t| + t.string 'first_name', limit: 255 + t.string 'last_name', limit: 255 + t.boolean 'super_admin' + t.string 'login', limit: 255, null: false + t.string 'email', limit: 255, null: false + t.string 'crypted_password', limit: 255, null: false + t.string 'password_salt', limit: 255, null: false + t.string 'persistence_token', limit: 255, null: false + t.string 'single_access_token', limit: 255, null: false + t.string 'perishable_token', limit: 255, null: false + t.integer 'login_count', limit: 4, default: 0, null: false + t.integer 'failed_login_count', limit: 4, default: 0, null: false + t.datetime 'last_request_at' + t.datetime 'current_login_at' + t.datetime 'last_login_at' + t.string 'current_login_ip', limit: 255 + t.string 'last_login_ip', limit: 255 + t.datetime 'created_at' + t.datetime 'updated_at' + t.string 'time_zone', limit: 255 + t.integer 'spud_role_id', limit: 4 + t.boolean 'requires_password_change', default: false end - create_table "spud_users", force: :cascade do |t| - t.string "first_name", limit: 255 - t.string "last_name", limit: 255 - t.boolean "super_admin" - t.string "login", limit: 255, null: false - t.string "email", limit: 255, null: false - t.string "crypted_password", limit: 255, null: false - t.string "password_salt", limit: 255, null: false - t.string "persistence_token", limit: 255, null: false - t.string "single_access_token", limit: 255, null: false - t.string "perishable_token", limit: 255, null: false - t.integer "login_count", limit: 4, default: 0, null: false - t.integer "failed_login_count", limit: 4, default: 0, null: false - t.datetime "last_request_at" - t.datetime "current_login_at" - t.datetime "last_login_at" - t.string "current_login_ip", limit: 255 - t.string "last_login_ip", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" - t.string "time_zone", limit: 255 - t.integer "spud_role_id", limit: 4 - t.boolean "requires_password_change", default: false - end + add_index 'spud_users', ['email'], name: 'index_spud_users_on_email', using: :btree + add_index 'spud_users', ['login'], name: 'index_spud_users_on_login', using: :btree + add_index 'spud_users', ['spud_role_id'], name: 'index_spud_users_on_spud_role_id', using: :btree - add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree - add_index "spud_users", ["login"], name: "index_spud_users_on_login", using: :btree - add_index "spud_users", ["spud_role_id"], name: "index_spud_users_on_spud_role_id", using: :btree - - create_table "tb_redirects", force: :cascade do |t| - t.string "owner_type", limit: 255 - t.integer "owner_id", limit: 4 - t.string "source", limit: 255, null: false - t.string "destination", limit: 255, null: false - t.string "created_by", limit: 255 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table 'tb_redirects', force: :cascade do |t| + t.string 'owner_type', limit: 255 + t.integer 'owner_id', limit: 4 + t.string 'source', limit: 255, null: false + t.string 'destination', limit: 255, null: false + t.string 'created_by', limit: 255 + t.datetime 'created_at', null: false + t.datetime 'updated_at', null: false end - add_index "tb_redirects", ["owner_type", "owner_id"], name: "index_tb_redirects_on_owner_type_and_owner_id", using: :btree - add_index "tb_redirects", ["source"], name: "index_tb_redirects_on_source", unique: true, using: :btree + add_index 'tb_redirects', ['owner_type', 'owner_id'], name: 'index_tb_redirects_on_owner_type_and_owner_id', using: :btree + add_index 'tb_redirects', ['source'], name: 'index_tb_redirects_on_source', unique: true, using: :btree end