typeOrm迁移增量

问题描述 投票:0回答:1

我在 Nestjs 上的项目中使用 typeOrm,问题是当我创建迁移时它不是增量的,

enter image description here

我正在搜索文档的详细信息,但没有找到任何结果:(, 如果我希望将来修改我的实体,它会重新创建整个表,而不是发出简单的“更改表”请求 `导出常量 dataSourceOption: DataSourceOptions = {

    type: 'mysql',
    host: 'localhost',
    port: 3306,
    username: 'root',
    password: '',
    database: 'testnestjs',
    entities: ['dist/**/*.entity.js'],
    migrations: ['dist/db/migrations/*.js'],
    synchronize: true,
  

} ` 谢谢

nestjs migration typeorm
1个回答
0
投票

感谢您的回复,我将提供一些信息: 我的第一次迁移: 然后当我重新启动迁移时,我收到此请求而不是更改表 [1]:https://i.stack.imgur.com/BGijG.png [2]:https://i.stack.imgur.com/DYHU2.png [3]:https://i.stack.imgur.com/bapjU.png [4]:https://i.stack.imgur.com/EAAXJ.png [5]:https://i.stack.imgur.com/pbNGi.png [6]:https://i.stack.imgur.com/7TP7o.png

© www.soinside.com 2019 - 2024. All rights reserved.