|
10 | 10 | #
|
11 | 11 | # It's strongly recommended that you check this file into your version control system.
|
12 | 12 |
|
13 |
| -ActiveRecord::Schema[7.0].define(version: 2022_09_03_052104) do |
| 13 | +ActiveRecord::Schema[7.0].define(version: 2022_09_03_052718) do |
14 | 14 | create_table "applications", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
15 |
| - t.string "name" |
16 |
| - t.string "token" |
| 15 | + t.string "name", null: false |
| 16 | + t.string "token", null: false |
17 | 17 | t.datetime "created_at", null: false
|
18 | 18 | t.datetime "updated_at", null: false
|
19 |
| - t.integer "chats_count", default: 0 |
| 19 | + t.integer "chats_count", default: 0, null: false |
20 | 20 | t.index ["token"], name: "index_applications_on_token", unique: true
|
21 | 21 | end
|
22 | 22 |
|
23 | 23 | create_table "chats", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
24 |
| - t.string "name" |
25 |
| - t.integer "number" |
26 |
| - t.integer "messages_count", default: 0 |
| 24 | + t.string "name", null: false |
| 25 | + t.integer "number", null: false |
| 26 | + t.integer "messages_count", default: 0, null: false |
27 | 27 | t.bigint "application_id", null: false
|
28 | 28 | t.datetime "created_at", null: false
|
29 | 29 | t.datetime "updated_at", null: false
|
|
32 | 32 | end
|
33 | 33 |
|
34 | 34 | create_table "messages", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
35 |
| - t.string "body" |
36 |
| - t.integer "number" |
| 35 | + t.string "body", null: false |
| 36 | + t.integer "number", null: false |
37 | 37 | t.bigint "chat_id", null: false
|
38 | 38 | t.datetime "created_at", null: false
|
39 | 39 | t.datetime "updated_at", null: false
|
|
0 commit comments