mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
remove trailing whitespace [ci skip]
This commit is contained in:
parent
184cc703a2
commit
fb2f8d2b75
1 changed files with 8 additions and 8 deletions
|
@ -1018,10 +1018,10 @@ such features, the `execute` method can be used to execute arbitrary SQL.
|
|||
Migrations and Seed Data
|
||||
------------------------
|
||||
|
||||
The main purpose of Rails' migration feature is to issue commands that modify the
|
||||
schema using a consistent process. Migrations can also be used
|
||||
to add or modify data. This is useful in an existing database that can't be destroyed
|
||||
and recreated, such as a production database.
|
||||
The main purpose of Rails' migration feature is to issue commands that modify the
|
||||
schema using a consistent process. Migrations can also be used
|
||||
to add or modify data. This is useful in an existing database that can't be destroyed
|
||||
and recreated, such as a production database.
|
||||
|
||||
```ruby
|
||||
class AddInitialProducts < ActiveRecord::Migration[5.0]
|
||||
|
@ -1037,10 +1037,10 @@ class AddInitialProducts < ActiveRecord::Migration[5.0]
|
|||
end
|
||||
```
|
||||
|
||||
To add initial data after a database is created, Rails has a built-in
|
||||
'seeds' feature that makes the process quick and easy. This is especially
|
||||
useful when reloading the database frequently in development and test environments.
|
||||
It's easy to get started with this feature: just fill up `db/seeds.rb` with some
|
||||
To add initial data after a database is created, Rails has a built-in
|
||||
'seeds' feature that makes the process quick and easy. This is especially
|
||||
useful when reloading the database frequently in development and test environments.
|
||||
It's easy to get started with this feature: just fill up `db/seeds.rb` with some
|
||||
Ruby code, and run `rails db:seed`:
|
||||
|
||||
```ruby
|
||||
|
|
Loading…
Reference in a new issue