activerecord-spanner-adapter 1.8.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/acceptance-tests-on-emulator.yaml +4 -6
  3. data/.github/workflows/ci.yaml +4 -6
  4. data/.github/workflows/nightly-acceptance-tests-on-emulator.yaml +4 -6
  5. data/.github/workflows/nightly-unit-tests.yaml +4 -6
  6. data/.github/workflows/rubocop.yaml +1 -1
  7. data/.github/workflows/samples.yaml +30 -0
  8. data/.kokoro/release.sh +1 -3
  9. data/.release-please-manifest.json +1 -1
  10. data/.rubocop.yml +2 -2
  11. data/CHANGELOG.md +18 -0
  12. data/Gemfile +6 -5
  13. data/README.md +11 -9
  14. data/acceptance/cases/migration/command_recorder_test.rb +7 -38
  15. data/acceptance/cases/migration/references_index_test.rb +2 -11
  16. data/acceptance/cases/models/binary_identifiers.rb +97 -0
  17. data/acceptance/models/binary_project.rb +20 -0
  18. data/acceptance/models/string_io.rb +28 -0
  19. data/acceptance/models/user.rb +20 -0
  20. data/acceptance/test_helper.rb +1 -0
  21. data/activerecord-spanner-adapter.gemspec +3 -3
  22. data/benchmarks/application.rb +3 -7
  23. data/examples/snippets/Rakefile +27 -5
  24. data/examples/snippets/array-data-type/application.rb +1 -5
  25. data/examples/snippets/array-data-type/config/database.yml +1 -0
  26. data/examples/snippets/bit-reversed-sequence/application.rb +0 -4
  27. data/examples/snippets/bit-reversed-sequence/config/database.yml +1 -0
  28. data/examples/snippets/bit-reversed-sequence/db/seeds.rb +2 -2
  29. data/examples/snippets/bulk-insert/application.rb +1 -5
  30. data/examples/snippets/bulk-insert/config/database.yml +1 -0
  31. data/examples/snippets/commit-timestamp/application.rb +0 -4
  32. data/examples/snippets/commit-timestamp/config/database.yml +1 -0
  33. data/examples/snippets/config/environment.rb +5 -0
  34. data/examples/snippets/create-records/application.rb +1 -5
  35. data/examples/snippets/create-records/config/database.yml +1 -0
  36. data/examples/snippets/date-data-type/application.rb +1 -5
  37. data/examples/snippets/date-data-type/config/database.yml +1 -0
  38. data/examples/snippets/date-data-type/db/seeds.rb +1 -1
  39. data/examples/snippets/generated-column/application.rb +0 -4
  40. data/examples/snippets/generated-column/config/database.yml +1 -0
  41. data/examples/snippets/generated-column/db/seeds.rb +1 -1
  42. data/examples/snippets/hints/application.rb +0 -4
  43. data/examples/snippets/hints/config/database.yml +1 -0
  44. data/examples/snippets/hints/db/seeds.rb +1 -1
  45. data/examples/snippets/interleaved-tables/application.rb +1 -5
  46. data/examples/snippets/interleaved-tables/config/database.yml +1 -0
  47. data/examples/snippets/interleaved-tables/db/seeds.rb +1 -1
  48. data/examples/snippets/interleaved-tables/models/album.rb +6 -2
  49. data/examples/snippets/interleaved-tables/models/track.rb +5 -1
  50. data/examples/snippets/interleaved-tables-before-7.1/application.rb +1 -5
  51. data/examples/snippets/interleaved-tables-before-7.1/config/database.yml +1 -0
  52. data/examples/snippets/interleaved-tables-before-7.1/db/seeds.rb +1 -1
  53. data/examples/snippets/migrations/application.rb +0 -4
  54. data/examples/snippets/migrations/config/database.yml +1 -0
  55. data/examples/snippets/mutations/application.rb +1 -5
  56. data/examples/snippets/mutations/config/database.yml +1 -0
  57. data/examples/snippets/mutations/db/seeds.rb +1 -1
  58. data/examples/snippets/optimistic-locking/application.rb +0 -4
  59. data/examples/snippets/optimistic-locking/config/database.yml +1 -0
  60. data/examples/snippets/optimistic-locking/db/seeds.rb +1 -1
  61. data/examples/snippets/partitioned-dml/application.rb +0 -4
  62. data/examples/snippets/partitioned-dml/config/database.yml +1 -0
  63. data/examples/snippets/partitioned-dml/db/seeds.rb +1 -1
  64. data/examples/snippets/query-logs/application.rb +15 -13
  65. data/examples/snippets/query-logs/config/database.yml +1 -0
  66. data/examples/snippets/query-logs/db/seeds.rb +1 -1
  67. data/examples/snippets/quickstart/application.rb +0 -4
  68. data/examples/snippets/quickstart/config/database.yml +1 -0
  69. data/examples/snippets/quickstart/db/seeds.rb +1 -1
  70. data/examples/snippets/read-only-transactions/application.rb +0 -4
  71. data/examples/snippets/read-only-transactions/config/database.yml +1 -0
  72. data/examples/snippets/read-only-transactions/db/seeds.rb +1 -1
  73. data/examples/snippets/read-write-transactions/application.rb +2 -6
  74. data/examples/snippets/read-write-transactions/config/database.yml +1 -0
  75. data/examples/snippets/read-write-transactions/db/seeds.rb +1 -1
  76. data/examples/snippets/stale-reads/application.rb +0 -4
  77. data/examples/snippets/stale-reads/config/database.yml +1 -0
  78. data/examples/snippets/stale-reads/db/seeds.rb +1 -1
  79. data/examples/snippets/tags/application.rb +0 -4
  80. data/examples/snippets/tags/config/database.yml +1 -0
  81. data/examples/snippets/tags/db/seeds.rb +1 -1
  82. data/examples/snippets/timestamp-data-type/application.rb +0 -4
  83. data/examples/snippets/timestamp-data-type/config/database.yml +1 -0
  84. data/lib/active_record/connection_adapters/spanner/column.rb +3 -3
  85. data/lib/active_record/connection_adapters/spanner/database_statements.rb +34 -22
  86. data/lib/active_record/connection_adapters/spanner/quoting.rb +2 -1
  87. data/lib/active_record/connection_adapters/spanner/schema_creation.rb +7 -9
  88. data/lib/active_record/connection_adapters/spanner/schema_definitions.rb +12 -2
  89. data/lib/active_record/connection_adapters/spanner/schema_statements.rb +17 -46
  90. data/lib/active_record/connection_adapters/spanner/type_metadata.rb +4 -6
  91. data/lib/active_record/connection_adapters/spanner_adapter.rb +20 -7
  92. data/lib/active_record/tasks/spanner_database_tasks.rb +4 -4
  93. data/lib/active_record/type/spanner/array.rb +4 -0
  94. data/lib/active_record/type/spanner/bytes.rb +10 -0
  95. data/lib/activerecord_spanner_adapter/base.rb +12 -18
  96. data/lib/activerecord_spanner_adapter/connection.rb +9 -5
  97. data/lib/activerecord_spanner_adapter/foreign_key.rb +9 -2
  98. data/lib/activerecord_spanner_adapter/index/column.rb +6 -1
  99. data/lib/activerecord_spanner_adapter/index.rb +10 -2
  100. data/lib/activerecord_spanner_adapter/information_schema.rb +1 -1
  101. data/lib/activerecord_spanner_adapter/primary_key.rb +2 -2
  102. data/lib/activerecord_spanner_adapter/table/column.rb +12 -3
  103. data/lib/activerecord_spanner_adapter/table.rb +8 -2
  104. data/lib/activerecord_spanner_adapter/transaction.rb +1 -1
  105. data/lib/activerecord_spanner_adapter/version.rb +1 -1
  106. data/lib/arel/visitors/spanner.rb +16 -11
  107. data/lib/spanner_client_ext.rb +4 -3
  108. metadata +13 -32
  109. data/examples/snippets/array-data-type/db/schema.rb +0 -31
  110. data/examples/snippets/bit-reversed-sequence/db/schema.rb +0 -31
  111. data/examples/snippets/bulk-insert/db/schema.rb +0 -31
  112. data/examples/snippets/commit-timestamp/db/schema.rb +0 -34
  113. data/examples/snippets/create-records/db/schema.rb +0 -31
  114. data/examples/snippets/date-data-type/db/schema.rb +0 -26
  115. data/examples/snippets/generated-column/db/schema.rb +0 -26
  116. data/examples/snippets/hints/db/schema.rb +0 -33
  117. data/examples/snippets/interleaved-tables/db/schema.rb +0 -39
  118. data/examples/snippets/interleaved-tables-before-7.1/db/schema.rb +0 -37
  119. data/examples/snippets/migrations/db/schema.rb +0 -38
  120. data/examples/snippets/mutations/db/schema.rb +0 -32
  121. data/examples/snippets/optimistic-locking/db/schema.rb +0 -34
  122. data/examples/snippets/partitioned-dml/db/schema.rb +0 -31
  123. data/examples/snippets/query-logs/db/schema.rb +0 -31
  124. data/examples/snippets/quickstart/db/schema.rb +0 -31
  125. data/examples/snippets/read-only-transactions/db/schema.rb +0 -31
  126. data/examples/snippets/read-write-transactions/db/schema.rb +0 -32
  127. data/examples/snippets/stale-reads/db/schema.rb +0 -31
  128. data/examples/snippets/tags/db/schema.rb +0 -31
  129. data/examples/snippets/timestamp-data-type/db/schema.rb +0 -26
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema[7.1].define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", primary_key: ["singerid", "albumid"], force: :cascade do |t|
17
- t.integer "singerid", limit: 8, null: false
18
- t.integer "albumid", limit: 8, null: false
19
- t.string "title"
20
- end
21
-
22
- create_table "singers", primary_key: "singerid", default: -> { "GET_NEXT_SEQUENCE_VALUE(SEQUENCE singer_sequence)" }, force: :cascade do |t|
23
- t.string "first_name"
24
- t.string "last_name"
25
- end
26
-
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,34 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.decimal "marketing_budget"
19
- t.integer "singer_id", limit: 8
20
- t.time "last_updated", allow_commit_timestamp: true
21
- end
22
-
23
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
24
- t.string "first_name"
25
- t.string "last_name"
26
- t.time "last_updated", allow_commit_timestamp: true
27
- end
28
-
29
- add_foreign_key "albums", "singers"
30
- connection.run_batch
31
- rescue
32
- abort_batch
33
- raise
34
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,26 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "first_name"
18
- t.string "last_name"
19
- t.date "birth_date"
20
- end
21
-
22
- connection.run_batch
23
- rescue
24
- abort_batch
25
- raise
26
- end
@@ -1,26 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "first_name", limit: 100
18
- t.string "last_name", limit: 200, null: false
19
- t.virtual "full_name", type: :string, limit: 300, null: false, as: "COALESCE(first_name || ' ', '') || last_name", stored: true
20
- end
21
-
22
- connection.run_batch
23
- rescue
24
- abort_batch
25
- raise
26
- end
@@ -1,33 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name", limit: 100
23
- t.string "last_name", limit: 200, null: false
24
- t.virtual "full_name", type: :string, limit: 300, null: false, as: "COALESCE(first_name || ' ', '') || last_name", stored: true
25
- t.index ["full_name"], name: "index_singers_on_full_name", order: { full_name: :asc }
26
- end
27
-
28
- add_foreign_key "albums", "singers"
29
- connection.run_batch
30
- rescue
31
- abort_batch
32
- raise
33
- end
@@ -1,39 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema[7.1].define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", primary_key: ["singerid", "albumid"], force: :cascade do |t|
17
- t.integer "singerid", limit: 8
18
- t.integer "albumid", limit: 8
19
- t.string "title"
20
- end
21
-
22
- create_table "singers", primary_key: "singerid", force: :cascade do |t|
23
- t.string "first_name"
24
- t.string "last_name"
25
- end
26
-
27
- create_table "tracks", primary_key: ["singerid", "albumid", "trackid"], force: :cascade do |t|
28
- t.integer "singerid", limit: 8
29
- t.integer "albumid", limit: 8
30
- t.integer "trackid", limit: 8
31
- t.string "title"
32
- t.decimal "duration"
33
- end
34
-
35
- connection.run_batch
36
- rescue
37
- abort_batch
38
- raise
39
- end
@@ -1,37 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", primary_key: "albumid", force: :cascade do |t|
17
- t.integer "singerid", limit: 8, null: false
18
- t.string "title"
19
- end
20
-
21
- create_table "singers", primary_key: "singerid", force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- create_table "tracks", primary_key: "trackid", force: :cascade do |t|
27
- t.integer "singerid", limit: 8, null: false
28
- t.integer "albumid", limit: 8, null: false
29
- t.string "title"
30
- t.decimal "duration"
31
- end
32
-
33
- connection.run_batch
34
- rescue
35
- abort_batch
36
- raise
37
- end
@@ -1,38 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singers_id", limit: 8
19
- t.index ["singers_id"], name: "index_albums_on_singers_id", order: { singers_id: :asc }
20
- end
21
-
22
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
23
- t.string "first_name"
24
- t.string "last_name"
25
- end
26
-
27
- create_table "tracks", id: { limit: 8 }, force: :cascade do |t|
28
- t.string "title"
29
- t.decimal "duration"
30
- t.integer "albums_id", limit: 8
31
- t.index ["albums_id"], name: "index_tracks_on_albums_id", order: { albums_id: :asc }
32
- end
33
-
34
- connection.run_batch
35
- rescue
36
- abort_batch
37
- raise
38
- end
@@ -1,32 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.decimal "marketing_budget"
19
- t.integer "singer_id", limit: 8
20
- end
21
-
22
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
23
- t.string "first_name"
24
- t.string "last_name"
25
- end
26
-
27
- add_foreign_key "albums", "singers"
28
- connection.run_batch
29
- rescue
30
- abort_batch
31
- raise
32
- end
@@ -1,34 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.decimal "marketing_budget"
19
- t.integer "singer_id", limit: 8
20
- t.integer "lock_version", limit: 8
21
- end
22
-
23
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
24
- t.string "first_name"
25
- t.string "last_name"
26
- t.integer "lock_version", limit: 8
27
- end
28
-
29
- add_foreign_key "albums", "singers"
30
- connection.run_batch
31
- rescue
32
- abort_batch
33
- raise
34
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name", limit: 100
23
- t.string "last_name", limit: 200, null: false
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema[7.1].define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,32 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.decimal "marketing_budget"
19
- t.integer "singer_id", limit: 8
20
- end
21
-
22
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
23
- t.string "first_name"
24
- t.string "last_name"
25
- end
26
-
27
- add_foreign_key "albums", "singers"
28
- connection.run_batch
29
- rescue
30
- abort_batch
31
- raise
32
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,31 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "albums", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.integer "singer_id", limit: 8
19
- end
20
-
21
- create_table "singers", id: { limit: 8 }, force: :cascade do |t|
22
- t.string "first_name"
23
- t.string "last_name"
24
- end
25
-
26
- add_foreign_key "albums", "singers"
27
- connection.run_batch
28
- rescue
29
- abort_batch
30
- raise
31
- end
@@ -1,26 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(version: 1) do
14
- connection.start_batch_ddl
15
-
16
- create_table "meetings", id: { limit: 8 }, force: :cascade do |t|
17
- t.string "title"
18
- t.time "meeting_time"
19
- t.string "meeting_timezone"
20
- end
21
-
22
- connection.run_batch
23
- rescue
24
- abort_batch
25
- raise
26
- end