Skip to content

Commit 6de92a5

Browse files
committed
Update remaining migration version 7.2 to 8.0 [ci-skip]
1 parent c4d6ba6 commit 6de92a5

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

guides/source/association_basics.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Without associations, creating and deleting books for that author would require
4444
a tedious and manual process. Here's what that would look like:
4545

4646
```ruby
47-
class CreateAuthors < ActiveRecord::Migration[7.2]
47+
class CreateAuthors < ActiveRecord::Migration[8.0]
4848
def change
4949
create_table :authors do |t|
5050
t.string :name
@@ -193,7 +193,7 @@ Rails will look for a class named `Authors` instead of `Author`.
193193
The corresponding migration might look like this:
194194

195195
```ruby
196-
class CreateBooks < ActiveRecord::Migration[7.2]
196+
class CreateBooks < ActiveRecord::Migration[8.0]
197197
def change
198198
create_table :authors do |t|
199199
t.string :name
@@ -435,7 +435,7 @@ is declared.
435435
The corresponding migration might look like this:
436436

437437
```ruby
438-
class CreateSuppliers < ActiveRecord::Migration[7.2]
438+
class CreateSuppliers < ActiveRecord::Migration[8.0]
439439
def change
440440
create_table :suppliers do |t|
441441
t.string :name
@@ -656,7 +656,7 @@ model is pluralized when declaring a `has_many` association.
656656
The corresponding migration might look like this:
657657

658658
```ruby
659-
class CreateAuthors < ActiveRecord::Migration[7.2]
659+
class CreateAuthors < ActiveRecord::Migration[8.0]
660660
def change
661661
create_table :authors do |t|
662662
t.string :name
@@ -988,7 +988,7 @@ Diagram](images/association_basics/has_many_through.png)
988988
The corresponding migration might look like this:
989989

990990
```ruby
991-
class CreateAppointments < ActiveRecord::Migration[7.2]
991+
class CreateAppointments < ActiveRecord::Migration[8.0]
992992
def change
993993
create_table :physicians do |t|
994994
t.string :name
@@ -1020,7 +1020,7 @@ key](active_record_composite_primary_keys.html) for the join table in the
10201020
`has_many :through` relationship like below:
10211021

10221022
```ruby
1023-
class CreateAppointments < ActiveRecord::Migration[7.2]
1023+
class CreateAppointments < ActiveRecord::Migration[8.0]
10241024
def change
10251025
# ...
10261026
create_table :appointments, primary_key: [:physician_id, :patient_id] do |t|
@@ -1131,7 +1131,7 @@ Diagram](images/association_basics/has_one_through.png)
11311131
The corresponding migration to set up these associations might look like this:
11321132

11331133
```ruby
1134-
class CreateAccountHistories < ActiveRecord::Migration[7.2]
1134+
class CreateAccountHistories < ActiveRecord::Migration[8.0]
11351135
def change
11361136
create_table :suppliers do |t|
11371137
t.string :name
@@ -1186,7 +1186,7 @@ manage the relationship between the associated records. The corresponding
11861186
migration might look like this:
11871187

11881188
```ruby
1189-
class CreateAssembliesAndParts < ActiveRecord::Migration[7.2]
1189+
class CreateAssembliesAndParts < ActiveRecord::Migration[8.0]
11901190
def change
11911191
create_table :assemblies do |t|
11921192
t.string :name
@@ -1471,7 +1471,7 @@ To implement these associations, you'll need to create the corresponding
14711471
database tables and set up the foreign key. Here's an example migration:
14721472

14731473
```ruby
1474-
class CreateSuppliers < ActiveRecord::Migration[7.2]
1474+
class CreateSuppliers < ActiveRecord::Migration[8.0]
14751475
def change
14761476
create_table :suppliers do |t|
14771477
t.string :name
@@ -1607,7 +1607,7 @@ foreign key column (`imageable_id`) and a type column (`imageable_type`) in the
16071607
model:
16081608

16091609
```ruby
1610-
class CreatePictures < ActiveRecord::Migration[7.2]
1610+
class CreatePictures < ActiveRecord::Migration[8.0]
16111611
def change
16121612
create_table :pictures do |t|
16131613
t.string :name
@@ -1631,7 +1631,7 @@ recommended to use `t.references` or its alias `t.belong_to` and specify
16311631
it automatically adds both the foreign key and type columns to the table.
16321632

16331633
```ruby
1634-
class CreatePictures < ActiveRecord::Migration[7.2]
1634+
class CreatePictures < ActiveRecord::Migration[8.0]
16351635
def change
16361636
create_table :pictures do |t|
16371637
t.string :name
@@ -1704,7 +1704,7 @@ To support this relationship, we need to add a `manager_id` column to the
17041704
manager).
17051705

17061706
```ruby
1707-
class CreateEmployees < ActiveRecord::Migration[7.2]
1707+
class CreateEmployees < ActiveRecord::Migration[8.0]
17081708
def change
17091709
create_table :employees do |t|
17101710
# Add a belongs_to reference to the manager, which is an employee.
@@ -2176,7 +2176,7 @@ the books table. For a brand new table, the migration might look something like
21762176
this:
21772177

21782178
```ruby
2179-
class CreateBooks < ActiveRecord::Migration[7.2]
2179+
class CreateBooks < ActiveRecord::Migration[8.0]
21802180
def change
21812181
create_table :books do |t|
21822182
t.datetime :published_at
@@ -2190,7 +2190,7 @@ end
21902190
Whereas for an existing table, it might look like this:
21912191

21922192
```ruby
2193-
class AddAuthorToBooks < ActiveRecord::Migration[7.2]
2193+
class AddAuthorToBooks < ActiveRecord::Migration[8.0]
21942194
def change
21952195
add_reference :books, :author
21962196
end
@@ -2230,7 +2230,7 @@ You can then fill out the migration and ensure that the table is created without
22302230
a primary key.
22312231

22322232
```ruby
2233-
class CreateAssembliesPartsJoinTable < ActiveRecord::Migration[7.2]
2233+
class CreateAssembliesPartsJoinTable < ActiveRecord::Migration[8.0]
22342234
def change
22352235
create_table :assemblies_parts, id: false do |t|
22362236
t.bigint :assembly_id
@@ -2251,7 +2251,7 @@ are you forgot to set `id: false` when creating your migration.
22512251
For simplicity, you can also use the method `create_join_table`:
22522252

22532253
```ruby
2254-
class CreateAssembliesPartsJoinTable < ActiveRecord::Migration[7.2]
2254+
class CreateAssembliesPartsJoinTable < ActiveRecord::Migration[8.0]
22552255
def change
22562256
create_join_table :assemblies, :parts do |t|
22572257
t.index :assembly_id
@@ -2271,7 +2271,7 @@ The main difference in schema implementation between creating a join table for
22712271
`has_many :through` requires an `id`.
22722272

22732273
```ruby
2274-
class CreateAppointments < ActiveRecord::Migration[7.2]
2274+
class CreateAppointments < ActiveRecord::Migration[8.0]
22752275
def change
22762276
create_table :appointments do |t|
22772277
t.belongs_to :physician

guides/source/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ database-agnostic.
412412
Let's take a look at the contents of our new migration file:
413413

414414
```ruby
415-
class CreateArticles < ActiveRecord::Migration[7.2]
415+
class CreateArticles < ActiveRecord::Migration[8.0]
416416
def change
417417
create_table :articles do |t|
418418
t.string :title
@@ -1351,7 +1351,7 @@ In addition to the model, Rails has also made a migration to create the
13511351
corresponding database table:
13521352

13531353
```ruby
1354-
class CreateComments < ActiveRecord::Migration[7.2]
1354+
class CreateComments < ActiveRecord::Migration[8.0]
13551355
def change
13561356
create_table :comments do |t|
13571357
t.string :commenter

0 commit comments

Comments
 (0)