简体   繁体   中英

Unable to add new table using migrate in Yii2

I have created two tables using the migrate command ./yii migrate/create table_name and ./yii migrate . Now I need to create new table what I want to use migrate command. But it shows error that I have already some tables exists what I created earlier. So, is it possible to create new table using migrate command.

If you need create new table with migrate command, you should ./yii migrate/create new)table_name and in file set your table. You must create new migration all time, if you need create/change table/field.

每次要更新数据库,创建新表,修改现有数据或只是输入要用于配置值的数据时,都必须先创建新的迁移,因此必须输入用于创建或更新的代码的功能数据库和功能部件,以便最终恢复数据库的状况。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM