mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
Add Post model
This commit is contained in:
18
db/schema.rb
18
db/schema.rb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user