drizzle-orm
Advanced tools
Comparing version 0.10.0 to 0.10.1
{ | ||
"name": "drizzle-orm", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -33,2 +33,3 @@ "use strict"; | ||
columns: indexColumnToReturn, | ||
isUnique: value.isUnique(), | ||
}; | ||
@@ -35,0 +36,0 @@ } |
@@ -77,3 +77,3 @@ "use strict"; | ||
uniqueIndex(columns) { | ||
return new tableIndex_1.default(this.tableName(), columns instanceof Array ? columns : [columns]); | ||
return new tableIndex_1.default(this.tableName(), columns instanceof Array ? columns : [columns], true); | ||
} | ||
@@ -80,0 +80,0 @@ varchar(name, params = {}) { |
16
test.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const _1 = require("."); | ||
const citiesTable_1 = require("./docs/tables/citiesTable"); | ||
const usersTable_1 = require("./docs/tables/usersTable"); | ||
const usersToUserGroups_1 = require("./docs/tables/usersToUserGroups"); | ||
const consoleLogger_1 = require("./logger/consoleLogger"); | ||
const serializer_1 = require("./serializer/serializer"); | ||
// import { Pool } from 'pg'; | ||
@@ -27,4 +27,6 @@ // import { DB } from '.'; | ||
db.useLogger(new consoleLogger_1.default()); | ||
// const serializer = new MigrationSerializer(); | ||
// const res = await serializer.fromDatabase(db); | ||
const table = new usersToUserGroups_1.default(db); | ||
const serializer = new serializer_1.default(); | ||
const res = serializer.generate([table], []); | ||
console.log(JSON.stringify(res, null, 2)); | ||
// fs.writeFileSync('introspected.json', JSON.stringify(res, null, 2), 'utf8'); | ||
@@ -35,3 +37,3 @@ // const ser = new MigrationSerializer(); | ||
// console.log(JSON.stringify(f, null, 2)); | ||
await _1.drizzle.migrator(db).migrate('drizzle.config.yaml'); | ||
// await drizzle.migrator(db).migrate('drizzle.config.yaml'); | ||
// await drizzle.migrator(db).migrate({ migrationFolder: 'drizzle' }); | ||
@@ -45,4 +47,4 @@ // const typesFileNames = fs.readdirSync('/Users/andrewsherman/IdeaProjects/datalayer-orm/src/examples/types'); | ||
// }); | ||
const usersTable = new usersTable_1.default(db); | ||
const citiesTable = new citiesTable_1.default(db); | ||
// const usersTable = new UsersTable(db); | ||
// const citiesTable = new CitiesTable(db); | ||
// await db.session().execute(Create.table(usersTable).build()); | ||
@@ -49,0 +51,0 @@ // await db.session().execute(Create.table(citiesTable).build()); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260862
5343