vereto-api/db/schema.rb

66 lines
2.5 KiB
Ruby
Raw Normal View History

2018-02-16 11:36:18 +00:00
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
2019-09-27 19:03:44 +02:00
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
2018-02-16 11:36:18 +00:00
#
# It's strongly recommended that you check this file into your version control system.
2019-09-27 19:03:44 +02:00
ActiveRecord::Schema.define(version: 2019_09_27_154659) do
2018-02-19 16:03:07 +00:00
2019-09-27 19:03:44 +02:00
create_table "articles", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
2018-02-19 16:03:07 +00:00
t.string "title"
t.text "post"
t.bigint "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_articles_on_user_id"
end
2018-02-16 11:36:18 +00:00
2019-09-27 19:03:44 +02:00
create_table "comments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
2018-02-22 16:00:39 +00:00
t.text "content"
t.bigint "article_id"
t.bigint "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["article_id"], name: "index_comments_on_article_id"
t.index ["user_id"], name: "index_comments_on_user_id"
end
2019-09-27 19:03:44 +02:00
create_table "user_profiles", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "avatar"
t.string "tagline"
t.date "dob"
t.string "role"
t.bigint "user_id"
2018-02-16 11:36:18 +00:00
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_user_profiles_on_user_id"
2018-02-16 11:36:18 +00:00
end
2019-09-27 19:03:44 +02:00
create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
2018-02-16 15:02:03 +00:00
t.string "name"
t.string "email"
t.string "password_digest"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
2019-09-27 19:03:44 +02:00
create_table "vouchers", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "voucher"
t.string "vouchee"
t.boolean "accepted"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
2018-02-19 16:03:07 +00:00
add_foreign_key "articles", "users"
2018-02-22 16:00:39 +00:00
add_foreign_key "comments", "articles"
add_foreign_key "comments", "users"
add_foreign_key "user_profiles", "users"
2018-02-16 11:36:18 +00:00
end