@stacksjs/database 0.70.257 → 0.70.258

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.
@@ -31,13 +31,13 @@ export function frameworkDatetimeTables() {
31
31
  export async function findTimestampColumns() {
32
32
  const tables = frameworkDatetimeTables(), placeholders = tables.map(() => "?").join(", ");
33
33
  return (await db.unsafe(`SELECT TABLE_NAME, COLUMN_NAME, IS_NULLABLE, COLUMN_DEFAULT, EXTRA
34
- FROM information_schema.COLUMNS
35
- WHERE TABLE_SCHEMA = DATABASE()
36
- AND TABLE_NAME IN (${placeholders})
37
- AND (
38
- DATA_TYPE = 'timestamp'
39
- OR (DATA_TYPE = 'varchar' AND COLUMN_NAME IN ('created_at', 'updated_at'))
40
- )`, tables).execute()).map((row) => ({
34
+ FROM information_schema.COLUMNS
35
+ WHERE TABLE_SCHEMA = DATABASE()
36
+ AND TABLE_NAME IN (${placeholders})
37
+ AND (
38
+ DATA_TYPE = 'timestamp'
39
+ OR (DATA_TYPE = 'varchar' AND COLUMN_NAME IN ('created_at', 'updated_at'))
40
+ )`, tables).execute()).map((row) => ({
41
41
  table: String(row.TABLE_NAME ?? row.table_name),
42
42
  column: String(row.COLUMN_NAME ?? row.column_name),
43
43
  nullable: String(row.IS_NULLABLE ?? row.is_nullable).toUpperCase() === "YES",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/database",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.257",
5
+ "version": "0.70.258",
6
6
  "description": "The Stacks database integration.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -58,15 +58,15 @@
58
58
  "dynamodb-tooling": "^0.3.2"
59
59
  },
60
60
  "devDependencies": {
61
- "@stacksjs/cli": "0.70.257",
62
- "@stacksjs/config": "0.70.257",
63
- "@stacksjs/logging": "0.70.257",
64
- "@stacksjs/router": "0.70.257",
61
+ "@stacksjs/cli": "0.70.258",
62
+ "@stacksjs/config": "0.70.258",
63
+ "@stacksjs/logging": "0.70.258",
64
+ "@stacksjs/router": "0.70.258",
65
65
  "better-dx": "^0.2.17",
66
- "@stacksjs/path": "0.70.257",
67
- "@stacksjs/query-builder": "0.70.257",
68
- "@stacksjs/storage": "0.70.257",
69
- "@stacksjs/strings": "0.70.257",
70
- "@stacksjs/utils": "0.70.257"
66
+ "@stacksjs/path": "0.70.258",
67
+ "@stacksjs/query-builder": "0.70.258",
68
+ "@stacksjs/storage": "0.70.258",
69
+ "@stacksjs/strings": "0.70.258",
70
+ "@stacksjs/utils": "0.70.258"
71
71
  }
72
72
  }