@telorun/sql 0.1.5 → 0.1.6
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/README.md
CHANGED
|
@@ -28,8 +28,9 @@ class SqlMigrationsResource {
|
|
|
28
28
|
const migrations = [];
|
|
29
29
|
for (const [, { resource }] of this.ctx.moduleContext.resourceInstances) {
|
|
30
30
|
if (resource.kind === "Sql.Migration") {
|
|
31
|
+
const version = (resource.version ?? resource.metadata.name);
|
|
31
32
|
migrations.push({
|
|
32
|
-
name:
|
|
33
|
+
name: version,
|
|
33
34
|
sql: resource.sql,
|
|
34
35
|
});
|
|
35
36
|
}
|
package/package.json
CHANGED
|
@@ -49,8 +49,9 @@ class SqlMigrationsResource implements ResourceInstance {
|
|
|
49
49
|
const migrations: MigrationEntry[] = [];
|
|
50
50
|
for (const [, { resource }] of this.ctx.moduleContext.resourceInstances) {
|
|
51
51
|
if (resource.kind === "Sql.Migration") {
|
|
52
|
+
const version = (resource.version ?? resource.metadata.name) as string;
|
|
52
53
|
migrations.push({
|
|
53
|
-
name:
|
|
54
|
+
name: version,
|
|
54
55
|
sql: resource.sql as string,
|
|
55
56
|
});
|
|
56
57
|
}
|