pqb 0.1.0 → 0.1.2

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.js CHANGED
@@ -1876,10 +1876,12 @@ const columnTypes = {
1876
1876
  json: (schemaOrFn) => new JSONColumn(schemaOrFn),
1877
1877
  jsonText: () => new JSONTextColumn(),
1878
1878
  array: (item) => new ArrayColumn(item),
1879
- timestamps: () => ({
1880
- createdAt: new TimestampColumn().default(raw("now()")),
1881
- updatedAt: new TimestampColumn().default(raw("now()"))
1882
- }),
1879
+ timestamps() {
1880
+ return {
1881
+ createdAt: this.timestamp().default(raw("now()")),
1882
+ updatedAt: this.timestamp().default(raw("now()"))
1883
+ };
1884
+ },
1883
1885
  primaryKey(columns, options) {
1884
1886
  tableData.primaryKey = { columns, options };
1885
1887
  return emptyObject;