@ghom/orm 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/table.js +3 -3
- package/package.json +1 -1
- package/tests/tables/b.js +3 -1
package/dist/app/table.js
CHANGED
|
@@ -109,14 +109,14 @@ export class Table {
|
|
|
109
109
|
version: -Infinity,
|
|
110
110
|
};
|
|
111
111
|
const baseVersion = data.version;
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
for (const [version, migration] of migrations) {
|
|
113
|
+
await this.db.schema.alterTable(this.options.name, (builder) => {
|
|
114
114
|
if (version <= data.version)
|
|
115
115
|
return;
|
|
116
116
|
migration(builder);
|
|
117
117
|
data.version = version;
|
|
118
118
|
});
|
|
119
|
-
}
|
|
119
|
+
}
|
|
120
120
|
await this.db("migration")
|
|
121
121
|
.insert(data)
|
|
122
122
|
.onConflict("table")
|
package/package.json
CHANGED
package/tests/tables/b.js
CHANGED