小编loo*_*oky的帖子

为什么迁移生成器要创建临时表?

当我运行迁移生成器时,它会创建一个表和一个临时表,然后对所有第一个表列的选择执行插入到临时表中,删除第一个表并将临时表重命名为与第一个表相同的名称。

我一定做错了什么,因为我见过的示例都没有在迁移输出中显示这一点。

这是我的 ormconfig.json

{
  "type": "sqlite",
  "database": "./db/database.sqlite",
  "synchronize": false,
  "migrationsRun": false,
  "logging": false,
  "entities": ["lib/entity/**/*.js"],
  "migrations": ["lib/migration/**/*.js"],
  "subscribers": ["lib/subscriber/**/*.js"],
  "cli": {
    "entitiesDir": "src/entity",
    "migrationsDir": "src/migration",
    "subscribersDir": "src/subscriber"
  }
}
Run Code Online (Sandbox Code Playgroud)

sqlite typeorm

6
推荐指数
0
解决办法
879
查看次数

支持Elm中的功能模式匹配

在Elm中有一种方法可以将函数的参数与Haskell中的多个定义进行模式匹配吗?

Haskell的例子:

factorial :: Int ->
factorial 0 = 1
factorial n = n * factorial (n - 1)
Run Code Online (Sandbox Code Playgroud)

functional-programming pattern-matching elm

5
推荐指数
1
解决办法
258
查看次数