Add Post model

This commit is contained in:
riggraz
2019-08-24 16:51:25 +02:00
parent c66d350004
commit 0ceaa6acb5
5 changed files with 101 additions and 1 deletions

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_08_24_093755) do
ActiveRecord::Schema.define(version: 2019_08_24_141258) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -31,6 +31,19 @@ ActiveRecord::Schema.define(version: 2019_08_24_093755) do
t.index ["name"], name: "index_post_statuses_on_name", unique: true
end
create_table "posts", force: :cascade do |t|
t.string "title", null: false
t.text "description"
t.bigint "board_id", null: false
t.bigint "user_id", null: false
t.bigint "post_status_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["board_id"], name: "index_posts_on_board_id"
t.index ["post_status_id"], name: "index_posts_on_post_status_id"
t.index ["user_id"], name: "index_posts_on_user_id"
end
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
@@ -50,4 +63,7 @@ ActiveRecord::Schema.define(version: 2019_08_24_093755) do
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end
add_foreign_key "posts", "boards"
add_foreign_key "posts", "post_statuses"
add_foreign_key "posts", "users"
end