sqlmorpheus 0.1.6 → 0.1.8

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/index.d.mts CHANGED
@@ -124,4 +124,4 @@ declare function prepareAndRunMigration(db: DatabaseAccess, instructions: Databa
124
124
  declare function runMigrationWithoutHistory(db: DatabaseAccess, instructions: DatabaseInstructions): Promise<void>;
125
125
  declare function rollback(db: DatabaseAccess, instructions: DatabaseInstructions, toVersion: number): Promise<void>;
126
126
 
127
- export { type DatabaseInstructions, DbTable, ForeignKey, prepareAndRunMigration, prepareMigration, rollback, runMigrationWithoutHistory, runPreparedMigrations };
127
+ export { type DatabaseAccess, type DatabaseInstructions, DbTable, ForeignKey, prepareAndRunMigration, prepareMigration, rollback, runMigrationWithoutHistory, runPreparedMigrations };
package/dist/index.d.ts CHANGED
@@ -124,4 +124,4 @@ declare function prepareAndRunMigration(db: DatabaseAccess, instructions: Databa
124
124
  declare function runMigrationWithoutHistory(db: DatabaseAccess, instructions: DatabaseInstructions): Promise<void>;
125
125
  declare function rollback(db: DatabaseAccess, instructions: DatabaseInstructions, toVersion: number): Promise<void>;
126
126
 
127
- export { type DatabaseInstructions, DbTable, ForeignKey, prepareAndRunMigration, prepareMigration, rollback, runMigrationWithoutHistory, runPreparedMigrations };
127
+ export { type DatabaseAccess, type DatabaseInstructions, DbTable, ForeignKey, prepareAndRunMigration, prepareMigration, rollback, runMigrationWithoutHistory, runPreparedMigrations };
package/dist/index.js CHANGED
@@ -114,6 +114,10 @@ var TableStructureGenerator = class {
114
114
  columnData.type = this.dialect.typeString;
115
115
  columnData.defaultValue = value === null ? this.dialect.typeNull : `"${this.dialect.formatValueToSql(value)}"`;
116
116
  break;
117
+ case "bigint":
118
+ columnData.type = this.dialect.typeBigInt;
119
+ columnData.defaultValue = value === null ? this.dialect.typeNull : this.dialect.formatValueToSql(value);
120
+ break;
117
121
  case "number":
118
122
  columnData.type = this.dialect.typeInt;
119
123
  columnData.defaultValue = value === null ? this.dialect.typeNull : this.dialect.formatValueToSql(value);
@@ -247,7 +251,6 @@ var FILENAME_DOWN_PREFIX = "down_to_";
247
251
  var MigrationHistoryManager = class {
248
252
  configPath;
249
253
  migrationsPath;
250
- lastVersion = 0;
251
254
  constructor(configPath) {
252
255
  this.configPath = configPath;
253
256
  this.migrationsPath = `${configPath}/migrations`;
@@ -307,6 +310,7 @@ var DefaultSql = class {
307
310
  canInspectPrimaryKey = false;
308
311
  typeString = "TEXT";
309
312
  typeInt = "INTEGER";
313
+ typeBigInt = "BIGINT";
310
314
  typeBoolean = "BOOLEAN";
311
315
  typeNull = "NULL";
312
316
  formatValueToSql(value) {
@@ -406,6 +410,7 @@ UPDATE ${MIGRATION_DATA_TABLE_NAME} SET version = ${newVersion} WHERE EXISTS (SE
406
410
  // src/lib/dialects/SqliteDialect.ts
407
411
  var SqliteDialect = class extends DefaultSql {
408
412
  typeBoolean = "INTEGER";
413
+ typeBigInt = "INTEGER";
409
414
  canAlterForeignKeys = false;
410
415
  canAlterPrimaryKey = false;
411
416
  canInspectForeignKeys = true;
package/dist/index.mjs CHANGED
@@ -82,6 +82,10 @@ var TableStructureGenerator = class {
82
82
  columnData.type = this.dialect.typeString;
83
83
  columnData.defaultValue = value === null ? this.dialect.typeNull : `"${this.dialect.formatValueToSql(value)}"`;
84
84
  break;
85
+ case "bigint":
86
+ columnData.type = this.dialect.typeBigInt;
87
+ columnData.defaultValue = value === null ? this.dialect.typeNull : this.dialect.formatValueToSql(value);
88
+ break;
85
89
  case "number":
86
90
  columnData.type = this.dialect.typeInt;
87
91
  columnData.defaultValue = value === null ? this.dialect.typeNull : this.dialect.formatValueToSql(value);
@@ -215,7 +219,6 @@ var FILENAME_DOWN_PREFIX = "down_to_";
215
219
  var MigrationHistoryManager = class {
216
220
  configPath;
217
221
  migrationsPath;
218
- lastVersion = 0;
219
222
  constructor(configPath) {
220
223
  this.configPath = configPath;
221
224
  this.migrationsPath = `${configPath}/migrations`;
@@ -275,6 +278,7 @@ var DefaultSql = class {
275
278
  canInspectPrimaryKey = false;
276
279
  typeString = "TEXT";
277
280
  typeInt = "INTEGER";
281
+ typeBigInt = "BIGINT";
278
282
  typeBoolean = "BOOLEAN";
279
283
  typeNull = "NULL";
280
284
  formatValueToSql(value) {
@@ -374,6 +378,7 @@ UPDATE ${MIGRATION_DATA_TABLE_NAME} SET version = ${newVersion} WHERE EXISTS (SE
374
378
  // src/lib/dialects/SqliteDialect.ts
375
379
  var SqliteDialect = class extends DefaultSql {
376
380
  typeBoolean = "INTEGER";
381
+ typeBigInt = "INTEGER";
377
382
  canAlterForeignKeys = false;
378
383
  canAlterPrimaryKey = false;
379
384
  canInspectForeignKeys = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sqlmorpheus",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "author": "JodliDev",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "dev": "tsup --watch",
24
24
  "test": "vitest run",
25
25
  "test:watch": "vitest",
26
- "run_publish": "npm publish"
26
+ "build_and_publish": "npm run build && npm publish"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/better-sqlite3": "^7.6.13",