create-phoenixjs 0.1.6 → 0.1.7
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/package.json
CHANGED
|
@@ -1025,7 +1025,8 @@ export abstract class Model {
|
|
|
1025
1025
|
|
|
1026
1026
|
if (result) {
|
|
1027
1027
|
// Update model with returned values (including generated ID)
|
|
1028
|
-
this
|
|
1028
|
+
// Use forceFill since this is trusted data from the database
|
|
1029
|
+
this.forceFill(result);
|
|
1029
1030
|
this.exists = true;
|
|
1030
1031
|
this.syncOriginal();
|
|
1031
1032
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Schema, Blueprint } from '@framework/database/schema';
|
|
3
|
-
import { Migration } from '@framework/database/migrations';
|
|
4
|
-
|
|
5
|
-
export class TestCliMigration implements Migration {
|
|
6
|
-
async up() {
|
|
7
|
-
await Schema.create('test_cli_table', (table) => {
|
|
8
|
-
table.id();
|
|
9
|
-
table.string('name');
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async down() {
|
|
14
|
-
await Schema.dropIfExists('test_cli_table');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Schema, Blueprint } from '@framework/database/schema';
|
|
2
|
-
import { Migration } from '@framework/database/migrations';
|
|
3
|
-
|
|
4
|
-
export class CreateTestMigrationsTable implements Migration {
|
|
5
|
-
/**
|
|
6
|
-
* Run the migrations.
|
|
7
|
-
*/
|
|
8
|
-
async up(): Promise<void> {
|
|
9
|
-
// await Schema.create('table_name', (table: Blueprint) => {
|
|
10
|
-
// table.id();
|
|
11
|
-
// table.timestamps();
|
|
12
|
-
// });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Reverse the migrations.
|
|
17
|
-
*/
|
|
18
|
-
async down(): Promise<void> {
|
|
19
|
-
// await Schema.dropIfExists('table_name');
|
|
20
|
-
}
|
|
21
|
-
}
|