LoginSignup
2
3

More than 5 years have passed since last update.

cakePHP3でbake model allで全てoverwrite!!!

Last updated at Posted at 2015-06-23

結論

何の事はないです、optionとして「-f」つければいいだけでした。

./bin/cake bake model all -f

その他オプション

それ以外は、こんな感じ。

Usage:
cake bake.bake model [subcommand] [options] [<name>]

Subcommands:

all  Bake all model files with associations and validation.

To see help on a subcommand use `cake bake.bake model [subcommand] --help`

Options:

--help, -h             Display this help.
--verbose, -v          Enable verbose output.
--quiet, -q            Enable quiet output.
--plugin, -p           Plugin to bake into.
--force, -f            Force overwriting existing files without
                       prompting.
--connection, -c       The datasource connection to get data from.
                       (default: default)
--theme, -t            The theme to use when baking code.
                       (choices: Bake|Migrations)
--table                The table name to use if you have
                       non-conventional table names.
--no-entity            Disable generating an entity class.
--no-table             Disable generating a table class.
--no-validation        Disable generating validation rules.
--no-rules             Disable generating a rules checker.
--no-associations      Disable generating associations.
--no-fields            Disable generating accessible fields in the
                       entity.
--fields               A comma separated list of fields to make
                       accessible.
--no-hidden            Disable generating hidden fields in the entity.
--hidden               A comma separated list of fields to hide.
--primary-key          The primary key if you would like to manually set
                       one. Can be a comma separated list if you are using a composite primary
                       key.
--display-field        The displayField if you would like to choose one.
--no-test              Do not generate a test case skeleton.
--no-fixture           Do not generate a test fixture skeleton.

Arguments:

name  Name of the model to bake. Can use Plugin.name to bake plugin
      models. (optional)

Omitting all arguments and options will list the table names you can
generate models for

とりあえず訳してみます。

option description
--help, -h Display this help. ヘルプを表示
--verbose, -v Enable verbose output. より詳細な説明を出力
--quiet, -q Enable quiet output. 何も出力しない
--plugin, -p Plugin to bake into. プラグインを使用
--force, -f Force overwriting existing files without prompting. 強制的にファイルを上書き
--connection, -c The datasource connection to get data from.(default: default) データソースの指定
--theme, -t The theme to use when baking code. (choices: Bake Migrations)
--table The table name to use if you have non-conventional table names. 命名規則にそっていないテーブル名の指定
--no-entity Disable generating an entity class. Entityクラスを生成しない
--no-table Disable generating a table class. Tableクラスを生成しない
--no-validation Disable generating validation rules. バリデーションを生成しない
--no-rules Disable generating a rules checker. ルールチェッカーを生成しない
--no-associations Disable generating associations. モデルの関連性を生成しない
--no-fields Disable generating accessible fields in the entity. アクセス可否を生成しない
--fields A comma separated list of fields to make accessible. アクセス可否を指定
--no-hidden Disable generating hidden fields in the entity. Entityの秘匿フィールドを生成しない(passwordとか)
--hidden A comma separated list of fields to hide. 秘匿フィールドを指定
--primary-key The primary key if you would like to manually set one. Can be a comma separated list if you are using a composite primary key. プライマリキーを指定
--display-field The displayField if you would like to choose one. 表示フィールドを指定
--no-test Do not generate a test case skeleton. テストを生成しない
--no-fixture Do not generate a test fixture skeleton. fixtureを生成しない

だんだん機械翻訳みたいになってしまいました・・。
全部実行したわけではないので、間違っていたらスミマセン(´・ω・`)

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3