ah-sequelize-plugin
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -73,5 +73,5 @@ "use strict"; | ||
let query = "SELECT NOW()"; | ||
if (actionhero_1.config.dialect === "mssql") | ||
if (actionhero_1.config.sequelize.dialect === "mssql") | ||
query = "SELECT GETDATE();"; | ||
if (actionhero_1.config.dialect === "sqlite") | ||
if (actionhero_1.config.sequelize.dialect === "sqlite") | ||
query = "SELECT strftime('%s', 'now');"; | ||
@@ -78,0 +78,0 @@ await actionhero_1.api.sequelize.query(query); |
@@ -1,2 +0,2 @@ | ||
export declare function up(migration: any, DataTypes: any): Promise<void>; | ||
export declare function down(migration: any): Promise<void>; | ||
export function up(migration: any, DataTypes: any): Promise<void>; | ||
export function down(migration: any): Promise<void>; |
@@ -1,2 +0,2 @@ | ||
export declare function up(migration: any, DataTypes: any): Promise<void>; | ||
export declare function down(migration: any): Promise<void>; | ||
export function up(migration: any, DataTypes: any): Promise<void>; | ||
export function down(migration: any): Promise<void>; |
@@ -6,3 +6,3 @@ { | ||
"description": "Use Sequelize in ActionHero", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"homepage": "http://actionherojs.com", | ||
@@ -44,3 +44,3 @@ "repository": { | ||
"ts-node-dev": "^1.0.0-pre.50", | ||
"typescript": "^3.9.6" | ||
"typescript": "^4.0.2" | ||
}, | ||
@@ -47,0 +47,0 @@ "peerDependencies": { |
@@ -20,3 +20,4 @@ ![plugin](https://i.imgur.com/nd1btLt.png) | ||
1. Install this plugin: `npm install ah-sequelize-plugin --save` | ||
2. Add sequelize packages: `npm install sequelize sequelize-typescript --save` | ||
2. Add sequelize packages: `npm install sequelize@5 sequelize-typescript --save` | ||
> !! Note that `sequelize-typescript` [currently requires sequelzie v5](https://github.com/actionhero/ah-sequelize-plugin/issues/172) | ||
3. Add types and reflexive addons: `npm install @types/bluebird @types/validator reflect-metadata --save` | ||
@@ -23,0 +24,0 @@ 4. Add plugin to your project's `./src/config/plugins.ts`: |
@@ -87,4 +87,5 @@ import { Sequelize } from "sequelize-typescript"; | ||
let query = "SELECT NOW()"; | ||
if (config.dialect === "mssql") query = "SELECT GETDATE();"; | ||
if (config.dialect === "sqlite") query = "SELECT strftime('%s', 'now');"; | ||
if (config.sequelize.dialect === "mssql") query = "SELECT GETDATE();"; | ||
if (config.sequelize.dialect === "sqlite") | ||
query = "SELECT strftime('%s', 'now');"; | ||
@@ -91,0 +92,0 @@ await api.sequelize.query(query); |
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
44778
32
963
366