localtower 0.4.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -46
- data/app/controllers/localtower/pages_controller.rb +28 -42
- data/app/helpers/localtower/application_helper.rb +0 -18
- data/app/views/layouts/localtower/application.html.erb +20 -79
- data/app/views/localtower/pages/_alert_no_models.html.erb +3 -0
- data/app/views/localtower/pages/migrations.html.erb +50 -120
- data/app/views/localtower/pages/models.html.erb +53 -68
- data/app/views/localtower/pages/new_migration.html.erb +103 -0
- data/app/views/localtower/pages/new_model.html.erb +87 -0
- data/config/routes.rb +8 -17
- data/lib/localtower/generators/migration.rb +53 -181
- data/lib/localtower/generators/model.rb +53 -32
- data/lib/localtower/generators/service_objects/insert_array.rb +23 -0
- data/lib/localtower/generators/service_objects/insert_defaults.rb +15 -43
- data/lib/localtower/generators/service_objects/insert_indexes.rb +80 -0
- data/lib/localtower/generators/service_objects/insert_nullable.rb +23 -0
- data/lib/localtower/status.rb +12 -7
- data/lib/localtower/tools.rb +29 -24
- data/lib/localtower/version.rb +1 -1
- data/lib/localtower.rb +0 -1
- data/public/css/app.css +0 -49
- data/public/js/app.js +216 -86
- data/public/light-bootstrap-dashboard-master/assets/css/light-bootstrap-dashboard.css +9 -35
- data/public/screenshots/v1.0.0/migrations.png +0 -0
- data/public/screenshots/v1.0.0/models.png +0 -0
- data/public/screenshots/v1.0.0/new_migration.png +0 -0
- data/public/screenshots/v1.0.0/new_model.png +0 -0
- data/public/vendor/font-awesome.min.css +4 -0
- data/public/vendor/highlight-js-default.min.css +9 -0
- data/public/vendor/highlight.min.js +1198 -0
- data/public/{js → vendor}/masonry.pkgd.min.js +0 -0
- data/spec/dummy/Gemfile +0 -3
- data/spec/dummy/Gemfile.lock +78 -95
- data/spec/dummy/app/controllers/pages_controller.rb +0 -2
- data/spec/dummy/app/models/post.rb +3 -0
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/app/views/pages/home.html.erb +0 -1
- data/spec/dummy/config/database.yml +1 -1
- data/spec/dummy/config/environments/development.rb +3 -1
- data/spec/dummy/config/puma.rb +1 -1
- data/spec/dummy/db/migrate/20230119221452_create_users.rb +14 -0
- data/spec/dummy/db/migrate/20230119221751_change_users_at1674166670.rb +7 -0
- data/spec/dummy/db/migrate/20230119222054_create_posts.rb +11 -0
- data/spec/dummy/db/migrate/20230119222106_change_posts_at1674166865.rb +5 -0
- data/spec/dummy/db/schema.rb +41 -0
- data/spec/dummy/log/development.log +16030 -10038
- data/spec/dummy/log/localtower.log +1878 -439
- data/spec/dummy/log/test.log +0 -281
- data/spec/dummy/test/index.html +38 -0
- data/spec/dummy/tmp/pids/server.pid +1 -1
- data/spec/factories/migration.rb +25 -41
- data/spec/factories/model.rb +39 -25
- data/spec/lib/localtower/generators/migration_spec.rb +36 -63
- data/spec/lib/localtower/generators/model_spec.rb +43 -34
- data/spec/lib/localtower/generators/service_objects/insert_array_spec.rb +47 -0
- data/spec/lib/localtower/generators/service_objects/insert_defaults_spec.rb +30 -35
- data/spec/lib/localtower/generators/service_objects/insert_indexes_spec.rb +90 -0
- data/spec/lib/localtower/generators/service_objects/insert_nullable_spec.rb +61 -0
- data/spec/lib/localtower/tools_spec.rb +1 -11
- data/spec/spec_helper.rb +25 -5
- metadata +38 -30
- data/app/views/localtower/pages/dashboard.html.erb +0 -67
- data/app/views/localtower/pages/logs.html.erb +0 -84
- data/app/views/localtower/pages/relations.html.erb +0 -66
- data/app/views/localtower/pages/tasks.html.erb +0 -48
- data/lib/localtower/generators/relation.rb +0 -59
- data/lib/localtower/plugins/capture.rb +0 -197
- data/lib/tasks/localtower_tasks.rake +0 -4
- data/spec/dummy/lib/playground.rb +0 -0
- data/spec/dummy/log/localtower_capture_d8979d360722798f7b6eb1a2694a3791.json +0 -1
- data/spec/lib/localtower/generators/relation_spec.rb +0 -65
data/spec/dummy/log/test.log
CHANGED
@@ -1,281 +0,0 @@
|
|
1
|
-
[1m[35m (7.8ms)[0m [1m[35mDROP TABLE if exists DAMS cascade;[0m
|
2
|
-
[1m[35m (2.3ms)[0m [1m[35mDROP TABLE if exists SCHEMA_MIGRATIONS cascade;[0m
|
3
|
-
[1m[35m (1.6ms)[0m [1m[35mDROP TABLE if exists AR_INTERNAL_METADATA cascade;[0m
|
4
|
-
[1m[35m (1.6ms)[0m [1m[35mDROP TABLE if exists TESTS cascade;[0m
|
5
|
-
[1m[35m (2.5ms)[0m [1m[35mDROP TABLE if exists POSTS cascade;[0m
|
6
|
-
[1m[35m (2.1ms)[0m [1m[35mDROP TABLE if exists DAMIANS cascade;[0m
|
7
|
-
[1m[35m (15.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
8
|
-
[1m[35m (6.9ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
9
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
10
|
-
[1m[35m (1.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
11
|
-
Migrating to ChangeTheModelPostAtTime1644360105 (20220208224147)
|
12
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
13
|
-
[1m[35m (5.7ms)[0m [1m[35mCREATE TABLE "posts" ("id" bigserial primary key)[0m
|
14
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.7ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224147"]]
|
15
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
16
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
17
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
18
|
-
[1m[36mActiveRecord::InternalMetadata Create (1.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "test"], ["created_at", "2022-02-08 22:41:48.328889"], ["updated_at", "2022-02-08 22:41:48.328889"]]
|
19
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
20
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
21
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
22
|
-
[1m[35m (0.7ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
23
|
-
[1m[35m (2.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
24
|
-
Migrating to ChangeTheModelUserAtTime1644360108 (20220208224149)
|
25
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
26
|
-
[1m[35m (10.8ms)[0m [1m[35mCREATE TABLE "users" ("id" bigserial primary key)[0m
|
27
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224149"]]
|
28
|
-
[1m[35m (1.0ms)[0m [1m[35mCOMMIT[0m
|
29
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
30
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
31
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
32
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
33
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
34
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
35
|
-
[1m[35m (2.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
36
|
-
Migrating to ChangeTheModelPostAtTime1644360110 (20220208224152)
|
37
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
38
|
-
[1m[35m (9.0ms)[0m [1m[35mALTER TABLE "posts" ADD "tags" text[] DEFAULT '{}'[0m
|
39
|
-
[1m[35m (1.9ms)[0m [1m[35mCREATE INDEX "index_posts_on_tags" ON "posts" USING gin ("tags")[0m
|
40
|
-
[1m[35m (0.4ms)[0m [1m[35mALTER TABLE "posts" ADD "views" integer DEFAULT 0 NOT NULL[0m
|
41
|
-
[1m[35m (0.2ms)[0m [1m[35mALTER TABLE "posts" ADD "content" text[0m
|
42
|
-
[1m[35m (0.3ms)[0m [1m[35mALTER TABLE "posts" ADD "title" character varying[0m
|
43
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224152"]]
|
44
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
45
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
46
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
47
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
48
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
49
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
50
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
51
|
-
[1m[35m (2.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
52
|
-
Migrating to ChangeTheModelPostAtTime1644360113 (20220208224154)
|
53
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
54
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224154"]]
|
55
|
-
[1m[35m (0.9ms)[0m [1m[35mCOMMIT[0m
|
56
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
57
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
58
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
59
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
60
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
61
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
62
|
-
[1m[35m (1.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
63
|
-
Migrating to ChangeTheModelPostAtTime1644360115 (20220208224157)
|
64
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
65
|
-
[1m[35m (1.4ms)[0m [1m[35mALTER TABLE "posts" RENAME COLUMN "content" TO "content_new"[0m
|
66
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.7ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224157"]]
|
67
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
68
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
69
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
70
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
71
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
72
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
73
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
74
|
-
[1m[35m (2.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
75
|
-
Migrating to ChangeTheModelPostAtTime1644360118 (20220208224159)
|
76
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
77
|
-
[1m[35m (1.0ms)[0m [1m[35mALTER TABLE "posts" RENAME COLUMN "views" TO "views_by_users"[0m
|
78
|
-
[1m[35m (3.0ms)[0m [1m[35mALTER TABLE "posts" DROP COLUMN "title"[0m
|
79
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224159"]]
|
80
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
81
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
82
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
83
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
84
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
85
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
86
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
87
|
-
[1m[35m (1.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
88
|
-
Migrating to ChangeTheModelPostAtTime1644360120 (20220208224202)
|
89
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
90
|
-
[1m[35m (3.4ms)[0m [1m[35mCREATE INDEX "index_posts_on_views_by_users" ON "posts" ("views_by_users")[0m
|
91
|
-
[1m[35m (1.3ms)[0m [1m[35mALTER TABLE "posts" ALTER COLUMN "content_new" TYPE character varying[0m
|
92
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224202"]]
|
93
|
-
[1m[35m (0.8ms)[0m [1m[35mCOMMIT[0m
|
94
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
95
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
96
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
97
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
98
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
99
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
100
|
-
[1m[35m (1.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
101
|
-
Migrating to ChangeTheModelPostAtTime1644360123 (20220208224204)
|
102
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
103
|
-
[1m[35m (3.9ms)[0m [1m[35mCREATE INDEX "index_posts_on_content_new" ON "posts" ("content_new")[0m
|
104
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224204"]]
|
105
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
106
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
107
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
108
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
109
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
110
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
111
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
112
|
-
[1m[35m (2.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
113
|
-
Migrating to ChangeTheModelPostAtTime1644360125 (20220208224207)
|
114
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
115
|
-
[1m[35m (1.8ms)[0m [1m[35mDROP INDEX "index_posts_on_views_by_users"[0m
|
116
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224207"]]
|
117
|
-
[1m[35m (2.1ms)[0m [1m[35mCOMMIT[0m
|
118
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
119
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
120
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
121
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
122
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
123
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
124
|
-
[1m[35m (1.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
125
|
-
Migrating to ChangeTheModelPostAtTime1644360128 (20220208224209)
|
126
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
127
|
-
[1m[35m (7.2ms)[0m [1m[35mDROP TABLE "posts" CASCADE[0m
|
128
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.7ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224209"]]
|
129
|
-
[1m[35m (3.7ms)[0m [1m[35mCOMMIT[0m
|
130
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
131
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
132
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
133
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
134
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
135
|
-
[1m[35m (3.1ms)[0m [1m[35mDROP TABLE if exists SCHEMA_MIGRATIONS cascade;[0m
|
136
|
-
[1m[35m (3.6ms)[0m [1m[35mDROP TABLE if exists AR_INTERNAL_METADATA cascade;[0m
|
137
|
-
[1m[35m (3.1ms)[0m [1m[35mDROP TABLE if exists USERS cascade;[0m
|
138
|
-
[1m[35m (12.8ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
139
|
-
[1m[35m (5.9ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
140
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
141
|
-
[1m[35m (1.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
142
|
-
Migrating to CreatePosts (20220208224212)
|
143
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
144
|
-
[1m[35m (8.5ms)[0m [1m[35mCREATE TABLE "posts" ("id" bigserial primary key, "title" character varying, "content" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
145
|
-
[1m[35m (0.7ms)[0m [1m[35mCREATE INDEX "index_posts_on_title" ON "posts" ("title")[0m
|
146
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224212"]]
|
147
|
-
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
148
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
149
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
150
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "test"], ["created_at", "2022-02-08 22:42:13.396376"], ["updated_at", "2022-02-08 22:42:13.396376"]]
|
151
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
152
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
153
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
154
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
155
|
-
[1m[35m (1.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
156
|
-
Migrating to CreateUsers (20220208224214)
|
157
|
-
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
158
|
-
[1m[35m (12.6ms)[0m [1m[35mCREATE TABLE "users" ("id" bigserial primary key, "name" character varying, "metadata" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
159
|
-
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_users_on_name" ON "users" ("name")[0m
|
160
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224214"]]
|
161
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
162
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
163
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
164
|
-
[1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
|
165
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
166
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
167
|
-
[1m[35m (4.0ms)[0m [1m[35mDROP TABLE if exists SCHEMA_MIGRATIONS cascade;[0m
|
168
|
-
[1m[35m (3.2ms)[0m [1m[35mDROP TABLE if exists AR_INTERNAL_METADATA cascade;[0m
|
169
|
-
[1m[35m (4.3ms)[0m [1m[35mDROP TABLE if exists POSTS cascade;[0m
|
170
|
-
[1m[35m (3.9ms)[0m [1m[35mDROP TABLE if exists USERS cascade;[0m
|
171
|
-
[1m[35m (14.5ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
172
|
-
[1m[35m (3.7ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
173
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
174
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
175
|
-
Migrating to CreatePosts (20220208224217)
|
176
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
177
|
-
[1m[35m (3.6ms)[0m [1m[35mCREATE TABLE "posts" ("id" bigserial primary key, "title" character varying, "content" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
178
|
-
[1m[35m (1.0ms)[0m [1m[35mCREATE INDEX "index_posts_on_title" ON "posts" ("title")[0m
|
179
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224217"]]
|
180
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
181
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
182
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
183
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "test"], ["created_at", "2022-02-08 22:42:18.353630"], ["updated_at", "2022-02-08 22:42:18.353630"]]
|
184
|
-
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
185
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
186
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
187
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
188
|
-
[1m[35m (2.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
189
|
-
Migrating to CreateUsers (20220208224219)
|
190
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
191
|
-
[1m[35m (59.7ms)[0m [1m[35mCREATE TABLE "users" ("id" bigserial primary key, "name" character varying, "metadata" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
192
|
-
[1m[35m (2.9ms)[0m [1m[35mCREATE INDEX "index_users_on_name" ON "users" ("name")[0m
|
193
|
-
[1m[36mActiveRecord::SchemaMigration Create (1.0ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224219"]]
|
194
|
-
[1m[35m (1.1ms)[0m [1m[35mCOMMIT[0m
|
195
|
-
[1m[36mActiveRecord::InternalMetadata Load (1.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
196
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
197
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
198
|
-
[1m[35m (0.6ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
199
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
200
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
201
|
-
[1m[35m (2.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
202
|
-
Migrating to ChangeTheModelPostAtTime1644360141 (20220208224222)
|
203
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
204
|
-
[1m[35m (2.1ms)[0m [1m[35mALTER TABLE "posts" ADD "user_id" bigint[0m
|
205
|
-
[1m[35m (3.6ms)[0m [1m[35mCREATE INDEX "index_posts_on_user_id" ON "posts" ("user_id")[0m
|
206
|
-
[1m[35m (9.5ms)[0m [1m[35mALTER TABLE "posts" ADD CONSTRAINT "fk_rails_5b5ddfd518"
|
207
|
-
FOREIGN KEY ("user_id")
|
208
|
-
REFERENCES "users" ("id")
|
209
|
-
[0m
|
210
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224222"]]
|
211
|
-
[1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
|
212
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
213
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
214
|
-
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
215
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
216
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
217
|
-
[1m[35m (6.7ms)[0m [1m[35mDROP TABLE if exists USERS cascade;[0m
|
218
|
-
[1m[35m (3.3ms)[0m [1m[35mDROP TABLE if exists SCHEMA_MIGRATIONS cascade;[0m
|
219
|
-
[1m[35m (1.9ms)[0m [1m[35mDROP TABLE if exists AR_INTERNAL_METADATA cascade;[0m
|
220
|
-
[1m[35m (2.9ms)[0m [1m[35mDROP TABLE if exists POSTS cascade;[0m
|
221
|
-
[1m[35m (14.5ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
222
|
-
[1m[35m (6.1ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
223
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
224
|
-
[1m[35m (0.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
225
|
-
Migrating to CreatePosts (20220208224224)
|
226
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
227
|
-
[1m[35m (9.0ms)[0m [1m[35mCREATE TABLE "posts" ("id" bigserial primary key, "title" character varying, "content" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
228
|
-
[1m[35m (0.7ms)[0m [1m[35mCREATE INDEX "index_posts_on_title" ON "posts" ("title")[0m
|
229
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.5ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224224"]]
|
230
|
-
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
231
|
-
Migrating to CreateUsers (20220208224225)
|
232
|
-
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
233
|
-
[1m[35m (3.2ms)[0m [1m[35mCREATE TABLE "users" ("id" bigserial primary key, "name" character varying, "metadata" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
234
|
-
[1m[35m (0.7ms)[0m [1m[35mCREATE INDEX "index_users_on_name" ON "users" ("name")[0m
|
235
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224225"]]
|
236
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
237
|
-
Migrating to CreateUserPosts (20220208224227)
|
238
|
-
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
239
|
-
[1m[35m (3.6ms)[0m [1m[35mCREATE TABLE "user_posts" ("id" bigserial primary key, "user_id" bigint, "post_id" bigint, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, CONSTRAINT "fk_rails_6c6a346128"
|
240
|
-
FOREIGN KEY ("user_id")
|
241
|
-
REFERENCES "users" ("id")
|
242
|
-
, CONSTRAINT "fk_rails_38a7c4b06f"
|
243
|
-
FOREIGN KEY ("post_id")
|
244
|
-
REFERENCES "posts" ("id")
|
245
|
-
)[0m
|
246
|
-
[1m[35m (0.6ms)[0m [1m[35mCREATE INDEX "index_user_posts_on_user_id" ON "user_posts" ("user_id")[0m
|
247
|
-
[1m[35m (0.8ms)[0m [1m[35mCREATE INDEX "index_user_posts_on_post_id" ON "user_posts" ("post_id")[0m
|
248
|
-
[1m[36mActiveRecord::SchemaMigration Create (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20220208224227"]]
|
249
|
-
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
250
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
251
|
-
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
252
|
-
[1m[36mActiveRecord::InternalMetadata Create (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "test"], ["created_at", "2022-02-08 22:42:28.406529"], ["updated_at", "2022-02-08 22:42:28.406529"]]
|
253
|
-
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
254
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
255
|
-
[1m[35m (0.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
256
|
-
[1m[35m (4.1ms)[0m [1m[35mDROP TABLE if exists SCHEMA_MIGRATIONS cascade;[0m
|
257
|
-
[1m[35m (2.9ms)[0m [1m[35mDROP TABLE if exists AR_INTERNAL_METADATA cascade;[0m
|
258
|
-
[1m[35m (6.3ms)[0m [1m[35mDROP TABLE if exists POSTS cascade;[0m
|
259
|
-
[1m[35m (5.1ms)[0m [1m[35mDROP TABLE if exists USERS cascade;[0m
|
260
|
-
[1m[35m (1.9ms)[0m [1m[35mDROP TABLE if exists USER_POSTS cascade;[0m
|
261
|
-
[1m[35m (0.3ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
262
|
-
[1m[36mActiveRecord::SchemaMigration Pluck (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
263
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
264
|
-
[1m[36mTRANSACTION (1.3ms)[0m [1m[35mBEGIN[0m
|
265
|
-
[1m[36mActiveRecord::InternalMetadata Update (1.7ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-04-23 20:12:23.735485"], ["key", "environment"]]
|
266
|
-
[1m[36mTRANSACTION (1.0ms)[0m [1m[35mCOMMIT[0m
|
267
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
268
|
-
[1m[36mActiveRecord::SchemaMigration Pluck (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
269
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
270
|
-
[1m[36mActiveRecord::SchemaMigration Pluck (0.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
271
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
272
|
-
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mBEGIN[0m
|
273
|
-
[1m[36mActiveRecord::InternalMetadata Update (0.4ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-07-03 18:37:21.534024"], ["key", "environment"]]
|
274
|
-
[1m[36mTRANSACTION (1.9ms)[0m [1m[35mCOMMIT[0m
|
275
|
-
[1m[35m (0.4ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
276
|
-
[1m[36mActiveRecord::SchemaMigration Pluck (0.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
277
|
-
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(268089350951355045)[0m
|
278
|
-
[1m[36mActiveRecord::SchemaMigration Pluck (1.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
279
|
-
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
280
|
-
[1m[35m (0.7ms)[0m [1m[34mSELECT pg_advisory_unlock(268089350951355045)[0m
|
281
|
-
[1m[36mActiveRecord::SchemaMigration Pluck (2.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
7
|
+
<script>
|
8
|
+
tailwind.config = {
|
9
|
+
theme: {
|
10
|
+
extend: {
|
11
|
+
colors: {
|
12
|
+
clifford: '#da373d',
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
</script>
|
18
|
+
<style type="text/tailwindcss">
|
19
|
+
@layer utilities {
|
20
|
+
.content-auto {
|
21
|
+
content-visibility: auto;
|
22
|
+
}
|
23
|
+
|
24
|
+
.nude {
|
25
|
+
@apply text-green-500;
|
26
|
+
|
27
|
+
}
|
28
|
+
}
|
29
|
+
</style>
|
30
|
+
</head>
|
31
|
+
<body>
|
32
|
+
<div class="container mx-auto">
|
33
|
+
<h1 class="nude text-3xl font-bold underline">
|
34
|
+
Hello world!
|
35
|
+
</h1>
|
36
|
+
</div>
|
37
|
+
</body>
|
38
|
+
</html>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
67242
|
data/spec/factories/migration.rb
CHANGED
@@ -1,28 +1,4 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :create_table, class: "Hash" do
|
3
|
-
migration_name { "Post" }
|
4
|
-
migrations do
|
5
|
-
[
|
6
|
-
{
|
7
|
-
action: "create_table",
|
8
|
-
table_name: "posts"
|
9
|
-
}
|
10
|
-
]
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
factory :create_table_two, class: "Hash" do
|
15
|
-
migration_name { "User" }
|
16
|
-
migrations do
|
17
|
-
[
|
18
|
-
{
|
19
|
-
action: "create_table",
|
20
|
-
table_name: "users"
|
21
|
-
}
|
22
|
-
]
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
2
|
factory :add_column, class: "Hash" do
|
27
3
|
migration_name { "Post" }
|
28
4
|
migrations do
|
@@ -32,7 +8,6 @@ FactoryBot.define do
|
|
32
8
|
table_name: "posts",
|
33
9
|
column: "title",
|
34
10
|
column_type: "string",
|
35
|
-
index: true,
|
36
11
|
nullable: true,
|
37
12
|
},
|
38
13
|
{
|
@@ -40,7 +15,6 @@ FactoryBot.define do
|
|
40
15
|
table_name: "posts",
|
41
16
|
column: "content",
|
42
17
|
column_type: "text",
|
43
|
-
index: false,
|
44
18
|
nullable: true,
|
45
19
|
},
|
46
20
|
{
|
@@ -64,20 +38,6 @@ FactoryBot.define do
|
|
64
38
|
end
|
65
39
|
end
|
66
40
|
|
67
|
-
factory :add_column_fail, class: "Hash" do
|
68
|
-
migration_name { "Post" }
|
69
|
-
migrations do
|
70
|
-
[
|
71
|
-
{
|
72
|
-
action: "add_column",
|
73
|
-
table_name: "posts",
|
74
|
-
column: "title",
|
75
|
-
# column_type: "string",
|
76
|
-
}
|
77
|
-
]
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
41
|
factory :rename_column, class: "Hash" do
|
82
42
|
migration_name { "Post" }
|
83
43
|
migrations do
|
@@ -134,10 +94,34 @@ FactoryBot.define do
|
|
134
94
|
migration_name { "Post" }
|
135
95
|
migrations do
|
136
96
|
[
|
97
|
+
{
|
98
|
+
action: "add_column",
|
99
|
+
table_name: "posts",
|
100
|
+
column: "content",
|
101
|
+
column_type: "text",
|
102
|
+
},
|
137
103
|
{
|
138
104
|
action: "add_index_to_column",
|
139
105
|
table_name: "posts",
|
140
|
-
column: "
|
106
|
+
column: "content",
|
107
|
+
},
|
108
|
+
{
|
109
|
+
action: "add_index_to_column",
|
110
|
+
table_name: "posts",
|
111
|
+
column: "content_second",
|
112
|
+
index: {
|
113
|
+
using: 'default',
|
114
|
+
unique: true,
|
115
|
+
}
|
116
|
+
},
|
117
|
+
{
|
118
|
+
action: "add_index_to_column",
|
119
|
+
table_name: "posts",
|
120
|
+
column: "content_third",
|
121
|
+
index: {
|
122
|
+
using: 'gin',
|
123
|
+
algorithm: 'concurrently',
|
124
|
+
}
|
141
125
|
}
|
142
126
|
]
|
143
127
|
end
|
data/spec/factories/model.rb
CHANGED
@@ -1,40 +1,54 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :post_one, class:
|
3
|
-
model_name {
|
2
|
+
factory :post_one, class: Hash do
|
3
|
+
model_name { 'Post' }
|
4
4
|
attributes do
|
5
5
|
[
|
6
6
|
{
|
7
|
-
attribute_name
|
8
|
-
attribute_type
|
9
|
-
index
|
7
|
+
'attribute_name' => 'title',
|
8
|
+
'attribute_type' => 'string',
|
9
|
+
'index' => {
|
10
|
+
'using' => 'default',
|
11
|
+
'unique' => true,
|
12
|
+
'algorithm' => 'default',
|
13
|
+
}
|
10
14
|
},
|
11
15
|
{
|
12
|
-
attribute_name
|
13
|
-
attribute_type
|
16
|
+
'attribute_name' => 'tags',
|
17
|
+
'attribute_type' => 'array',
|
18
|
+
'nullable' => false,
|
19
|
+
'default' => '[]',
|
20
|
+
'index' => {
|
21
|
+
'using' => 'gin',
|
22
|
+
'unique' => true,
|
23
|
+
'algorithm' => 'concurrently',
|
24
|
+
}
|
14
25
|
},
|
15
|
-
]
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
factory :user_one, class: "Hash" do
|
20
|
-
model_name { "User" }
|
21
|
-
attributes do
|
22
|
-
[
|
23
26
|
{
|
24
|
-
attribute_name
|
25
|
-
attribute_type
|
26
|
-
|
27
|
+
'attribute_name' => 'content',
|
28
|
+
'attribute_type' => 'text',
|
29
|
+
'nullable' => false,
|
30
|
+
'index' => {
|
31
|
+
'using' => 'gist',
|
32
|
+
'algorithm' => 'default',
|
33
|
+
}
|
27
34
|
},
|
28
35
|
{
|
29
|
-
attribute_name
|
30
|
-
attribute_type
|
36
|
+
'attribute_name' => 'likes_count',
|
37
|
+
'attribute_type' => 'integer',
|
38
|
+
'nullable' => true,
|
39
|
+
'default' => '0',
|
40
|
+
},
|
41
|
+
{
|
42
|
+
'attribute_name' => 'score',
|
43
|
+
'attribute_type' => 'float',
|
44
|
+
},
|
45
|
+
{
|
46
|
+
'attribute_name' => 'metadata',
|
47
|
+
'attribute_type' => 'jsonb',
|
48
|
+
'nullable' => false,
|
49
|
+
'default' => '{}',
|
31
50
|
},
|
32
51
|
]
|
33
52
|
end
|
34
53
|
end
|
35
|
-
|
36
|
-
factory :relation_one, class: "Hash" do
|
37
|
-
model_one_name { "User" }
|
38
|
-
model_two_name { "Post" }
|
39
|
-
end
|
40
54
|
end
|