3.0.5 • Published 2 years ago

egg-migration-template v3.0.5

Weekly downloads
109
License
ISC
Repository
-
Last release
2 years ago

egg-migration-template

使用模版自定义migration、model、service的生成,免除手动工作

安装

npm install -g egg-migration-template

依赖(重要)

  1. egg工程根目录下必须有templates目录,可以将本工程的demo/templates目录拷贝过去进行修改
  2. database/config.json,里面必须有development项的数据库配置
  3. 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

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.15

3 years ago

2.0.16

3 years ago

2.0.19

3 years ago

2.0.17

3 years ago

2.0.18

3 years ago

2.0.24

3 years ago

2.0.25

3 years ago

2.0.22

3 years ago

2.0.23

3 years ago

2.0.20

3 years ago

2.0.21

3 years ago

2.0.14

3 years ago

2.0.13

3 years ago

2.0.11

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago