forj 0.0.8 → 0.0.9

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "forj",
3
3
  "description": "SQLite ORM and Query Builder whitout dependencies",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "files": ["src"],
@@ -53,6 +53,9 @@ export default class SchemaBuilder {
53
53
  if (column.length && !column.type.includes('('))
54
54
  sql += `(${column.length})`
55
55
 
56
+ if (column.primary)
57
+ sql += ' PRIMARY KEY'
58
+
56
59
  if (column.autoIncrement)
57
60
  sql += ' AUTOINCREMENT'
58
61
 
@@ -80,9 +83,6 @@ export default class SchemaBuilder {
80
83
  if (column.unique)
81
84
  sql += ' UNIQUE'
82
85
 
83
- if (column.primary)
84
- sql += ' PRIMARY KEY'
85
-
86
86
  // if (column.comment)
87
87
  // sql += ` COMMENT '${column.comment.replace(/'/g, "''")}'`
88
88
 
@@ -31,7 +31,7 @@ export class Migrator {
31
31
  static async queue() {
32
32
  this.#ensureDir(this.#input)
33
33
  const files = await glob(join(this.#input, '/*.{ts,js}'))
34
- const list: Queue = {'pending': [], 'migrated': []}
34
+ const list: Queue = {pending: [], migrated: []}
35
35
 
36
36
  for (const file of files) {
37
37
  if (file.includes('.d.')) continue