Permalink
Browse files

Update schema and annotations

  • Loading branch information...
gambala committed May 25, 2018
1 parent b0e9b84 commit 9fa96c2908dc9466354c6dc4a886d7d19cd6a070
View
@@ -27,7 +27,7 @@ def need_graduate?
# course_id :integer
# rating :integer
# graduate :boolean default(FALSE)
# kind :integer default(1), not null
# kind :integer default("comment"), not null
#
# Indexes
#
View
@@ -1,4 +1,3 @@
# encoding: UTF-8
# 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.
@@ -11,62 +10,59 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161206133931) do
ActiveRecord::Schema.define(version: 2016_12_06_133931) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "comments", force: :cascade do |t|
t.integer "user_id"
t.text "content", default: "", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "course_id"
t.integer "rating"
t.boolean "graduate", default: false
t.integer "kind", default: 1, null: false
create_table "comments", id: :serial, force: :cascade do |t|
t.integer "user_id"
t.text "content", default: "", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "course_id"
t.integer "rating"
t.boolean "graduate", default: false
t.integer "kind", default: 1, null: false
t.index ["course_id"], name: "index_comments_on_course_id"
t.index ["kind"], name: "index_comments_on_kind"
t.index ["rating"], name: "index_comments_on_rating"
t.index ["user_id"], name: "index_comments_on_user_id"
end
add_index "comments", ["course_id"], name: "index_comments_on_course_id", using: :btree
add_index "comments", ["kind"], name: "index_comments_on_kind", using: :btree
add_index "comments", ["rating"], name: "index_comments_on_rating", using: :btree
add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree
create_table "courses", force: :cascade do |t|
t.string "title", default: "", null: false
t.text "description", default: "", null: false
t.string "language", default: "Русский", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "paid", default: false
t.boolean "approved", default: false, null: false
t.string "url"
create_table "courses", id: :serial, force: :cascade do |t|
t.string "title", default: "", null: false
t.text "description", default: "", null: false
t.string "language", default: "Русский", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "paid", default: false
t.boolean "approved", default: false, null: false
t.string "url"
t.index ["title"], name: "index_courses_on_title", unique: true
end
add_index "courses", ["title"], name: "index_courses_on_title", unique: true, using: :btree
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
create_table "users", id: :serial, force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.inet "current_sign_in_ip"
t.inet "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "role", default: "user", null: false
t.string "provider"
t.string "uid"
t.string "username"
t.string "github_name"
t.inet "current_sign_in_ip"
t.inet "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "role", default: "user", null: false
t.string "provider"
t.string "uid"
t.string "username"
t.string "github_name"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["username"], name: "index_users_on_username", unique: true
end
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree
end
@@ -23,7 +23,7 @@
# course_id :integer
# rating :integer
# graduate :boolean default(FALSE)
# kind :integer default(1), not null
# kind :integer default("comment"), not null
#
# Indexes
#
@@ -73,7 +73,7 @@
# course_id :integer
# rating :integer
# graduate :boolean default(FALSE)
# kind :integer default(1), not null
# kind :integer default("comment"), not null
#
# Indexes
#
View
@@ -26,3 +26,25 @@ comment_about_paid_english_course:
rating: 4
content: Лучше, чем бесплатная версия.
kind: 1
# == Schema Information
#
# Table name: comments
#
# id :integer not null, primary key
# user_id :integer
# content :text default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
# course_id :integer
# rating :integer
# graduate :boolean default(FALSE)
# kind :integer default("comment"), not null
#
# Indexes
#
# index_comments_on_course_id (course_id)
# index_comments_on_kind (kind)
# index_comments_on_rating (rating)
# index_comments_on_user_id (user_id)
#
View
@@ -40,3 +40,22 @@ random_course_<%= i %>:
language: <%= %w(Русский English).sample %>
approved: true
<% end %>
# == Schema Information
#
# Table name: courses
#
# id :integer not null, primary key
# title :string default(""), not null
# description :text default(""), not null
# language :string default("Русский"), not null
# created_at :datetime not null
# updated_at :datetime not null
# paid :boolean default(FALSE)
# approved :boolean default(FALSE), not null
# url :string
#
# Indexes
#
# index_courses_on_title (title) UNIQUE
#
View
@@ -3,3 +3,33 @@ demo:
encrypted_password: <%= Devise::Encryptor.digest(User, 'demo') %>
role: admin
username: Демо Аккаунт
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# email :string default(""), not null
# encrypted_password :string default(""), not null
# reset_password_token :string
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :inet
# last_sign_in_ip :inet
# created_at :datetime not null
# updated_at :datetime not null
# role :string default("user"), not null
# provider :string
# uid :string
# username :string
# github_name :string
#
# Indexes
#
# index_users_on_email (email) UNIQUE
# index_users_on_reset_password_token (reset_password_token) UNIQUE
# index_users_on_username (username) UNIQUE
#

0 comments on commit 9fa96c2

Please sign in to comment.