-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.rb
119 lines (101 loc) · 4.79 KB
/
schema.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# 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.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# 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: 20130417083858) do
create_table "materials", force: true do |t|
t.integer "subject_id", null: false
t.integer "user_id", null: false
t.integer "class_year"
t.integer "number"
t.boolean "with_answer"
t.string "comments"
t.string "file_name", null: false
t.string "file_content_type", null: false
t.integer "download_count", default: 0, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "material_type", default: "exam", null: false
t.integer "page", default: 1, null: false
end
add_index "materials", ["subject_id"], name: "index_materials_on_subject_id"
add_index "materials", ["user_id"], name: "index_materials_on_user_id"
create_table "ml_accounts", force: true do |t|
t.integer "year_id", null: false
t.string "email", null: false
t.string "subject_prefix"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "ml_accounts", ["year_id"], name: "index_ml_accounts_on_year_id"
create_table "ml_archives", force: true do |t|
t.integer "ml_account_id", null: false
t.string "from", null: false
t.string "from_name"
t.datetime "sent_at", null: false
t.string "subject", null: false
t.integer "archive_number"
t.text "body", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "stripped_subject"
end
add_index "ml_archives", ["ml_account_id"], name: "index_ml_archives_on_ml_account_id"
create_table "semesters", force: true do |t|
t.integer "year_id", null: false
t.string "identifier", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "semesters", ["year_id"], name: "index_semesters_on_year_id"
create_table "semesters_subjects", id: false, force: true do |t|
t.integer "semester_id"
t.integer "subject_id"
end
add_index "semesters_subjects", ["semester_id", "subject_id"], name: "index_semesters_subjects_on_semester_id_and_subject_id", unique: true
create_table "subjects", force: true do |t|
t.string "title_en", null: false
t.string "title_ja", null: false
t.string "staff_name", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "subjects", ["title_en"], name: "index_subjects_on_title_en", unique: true
add_index "subjects", ["title_ja"], name: "index_subjects_on_title_ja", unique: true
create_table "users", force: true do |t|
t.string "family_name", null: false
t.string "given_name", null: false
t.string "handle_name", null: false
t.date "birthday", null: false
t.string "email_official", null: false
t.string "email_private"
t.integer "year_id", null: false
t.boolean "is_admin", default: false, null: false
t.integer "status", null: false
t.string "auth_token", null: false
t.string "secret_token"
t.string "secret_token_generated_at"
t.string "password_digest", null: false
t.datetime "last_login_at"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "users", ["auth_token"], name: "index_users_on_auth_token", unique: true
add_index "users", ["email_official"], name: "index_users_on_email_official", unique: true
add_index "users", ["handle_name"], name: "index_users_on_handle_name", unique: true
create_table "years", force: true do |t|
t.integer "class_year", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "calendar_id"
end
add_index "years", ["class_year"], name: "index_years_on_class_year", unique: true
end