3.0.5 • Published 4 years ago
egg-migration-template v3.0.5
egg-migration-template
使用模版自定义migration、model、service的生成,免除手动工作
安装
npm install -g egg-migration-template
依赖(重要)
- egg工程根目录下必须有templates目录,可以将本工程的demo/templates目录拷贝过去进行修改
- database/config.json,里面必须有development项的数据库配置
- database/migrations目录必须有
example:
1. 生成migration
egg-migration-template --ac=create-table --t=user_role_relationships --st=user_role_relationship --comment=用户角色关系
2. 生成model,生成service和model_extends
egg-migration-template --t=user_role_relationships --st=user_role_relationship --to=base_platform/base_data
3. 更新model,不会更新service和model_extends
egg-migration-template --t=user_role_relationships --st=user_role_relationship
--t, --table: 必需,表的复数表名,如users
--st, --sigle-table-name: 必需,单数表名,如user
--ac, --action: 非必需:
create-table:生成创建表的migration
没有值时,表示根据table,更新model
--c, --comment: 当action=create-table时必需,表的comment
--to: 非必需,目标目录,只需要跟上在model下面的目录结构,默认'./'
3.0.5
4 years ago
3.0.4
4 years ago
3.0.3
4 years ago
3.0.2
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.0.15
4 years ago
2.0.16
4 years ago
2.0.19
4 years ago
2.0.17
4 years ago
2.0.18
4 years ago
2.0.24
4 years ago
2.0.25
4 years ago
2.0.22
4 years ago
2.0.23
4 years ago
2.0.20
4 years ago
2.0.21
4 years ago
2.0.14
4 years ago
2.0.13
4 years ago
2.0.11
4 years ago
2.0.10
4 years ago
2.0.9
4 years ago
2.0.8
4 years ago
2.0.7
4 years ago
2.0.6
5 years ago
2.0.5
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago