-
-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathschema.rb
122 lines (112 loc) · 4.99 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
120
121
122
# 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.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/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.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2025_03_15_124619) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "plpgsql"
create_table "dojo_event_services", id: :serial, force: :cascade do |t|
t.integer "dojo_id", null: false
t.integer "name", null: false
t.string "url"
t.string "group_id"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["dojo_id"], name: "index_dojo_event_services_on_dojo_id"
end
create_table "dojos", id: :serial, force: :cascade do |t|
t.string "name"
t.string "email"
t.string "order", default: "000000"
t.string "description"
t.string "logo", default: "/logo.png"
t.string "url", default: "#"
t.text "tags"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.integer "prefecture_id"
t.boolean "is_active", default: true, null: false
t.boolean "is_private", default: false, null: false
t.integer "counter", default: 1, null: false
t.string "note", default: "", null: false
end
create_table "event_histories", id: :serial, force: :cascade do |t|
t.integer "dojo_id", null: false
t.string "dojo_name", null: false
t.string "service_name", null: false
t.string "service_group_id"
t.string "event_id", null: false
t.string "event_url", null: false
t.integer "participants", null: false
t.datetime "evented_at", precision: nil, null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["dojo_id"], name: "index_event_histories_on_dojo_id"
t.index ["evented_at", "dojo_id"], name: "index_event_histories_on_evented_at_and_dojo_id"
t.index ["service_name", "event_id"], name: "index_event_histories_on_service_name_and_event_id", unique: true
end
create_table "podcasts", force: :cascade do |t|
t.string "enclosure_url", null: false
t.string "title", null: false
t.text "description"
t.integer "content_size", null: false
t.string "duration", null: false
t.string "permalink", null: false
t.string "permalink_url", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.date "published_date", null: false
t.index ["enclosure_url"], name: "index_podcasts_on_enclosure_url", unique: true
end
create_table "pokemons", force: :cascade do |t|
t.string "email", null: false
t.string "parent_name", null: false
t.string "participant_name", null: false
t.string "dojo_name", null: false
t.text "presigned_url"
t.string "download_key"
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["download_key"], name: "index_pokemons_on_download_key", unique: true
end
create_table "prefectures", force: :cascade do |t|
t.string "name"
t.string "region"
t.index ["name"], name: "index_prefectures_on_name", unique: true
t.index ["region"], name: "index_prefectures_on_region"
end
create_table "stretch3s", force: :cascade do |t|
t.string "email", null: false
t.string "parent_name", null: false
t.string "participant_name", null: false
t.string "dojo_name", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "upcoming_events", force: :cascade do |t|
t.integer "dojo_event_service_id", null: false
t.string "event_id", null: false
t.string "event_url", null: false
t.datetime "event_at", precision: nil, null: false
t.string "service_name", null: false
t.integer "participants", null: false
t.string "event_title", null: false
t.datetime "event_end_at", precision: nil, null: false
t.datetime "event_update_at", precision: nil
t.string "address"
t.string "place"
t.integer "limit"
t.index ["dojo_event_service_id"], name: "index_upcoming_events_on_dojo_event_service_id"
t.index ["service_name", "event_id"], name: "index_upcoming_events_on_service_name_and_event_id", unique: true
end
add_foreign_key "dojo_event_services", "dojos"
add_foreign_key "event_histories", "dojos"
end