生成器
原文:https://gobuffalo.io/documentation/database/generators/
Generators 生成器
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| $ buffalo pop g --help
Generates config, model, and migrations files.
Usage:
buffalo-pop pop generate [command]
Aliases:
generate, g
Available Commands:
config Generates a database.yml file for your project.
fizz Generates Up/Down migrations for your database using fizz.
model Generates a model for your database
sql Generates Up/Down migrations for your database using SQL.
Flags:
-h, --help help for generate
Global Flags:
-c, --config string The configuration file you would like to use.
-d, --debug Use debug/verbose mode
-e, --env string The environment you want to run migrations against. Will use $GO_ENV if set. (default "development")
-p, --path string Path to the migrations folder (default "./migrations")
Use "buffalo-pop pop generate [command] --help" for more information about a command.
|
Migrations 迁移
For information on generating migrations see Migrations.
有关生成迁移的信息,请参阅迁移。