vincit / knex-db-manager Goto Github PK
View Code? Open in Web Editor NEWUtility for create, drop, truncate etc. administrative database operations.
Home Page: https://vincit.github.io/knex-db-manager/
License: ISC License
Utility for create, drop, truncate etc. administrative database operations.
Home Page: https://vincit.github.io/knex-db-manager/
License: ISC License
Branch | Build failing π¨ |
---|---|
Dependency | npm-check |
Current Version | 5.4.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As npm-check is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 22 commits0.
ad56b8b
v5.4.2
4f4b581
support private registries like Artifactory
b18ccfa
Clean up README & finish devOnly feature (#220)
0288d64
Merge pull request #230 from rouanw/fix_specials_bug
5404599
check special files even when only one is provided
690881a
Merge pull request #228 from AaronAsAChimp/fix-skip-unused
3e7f48a
Merge pull request #223 from rouanw/depcheck_specials
4cfde3f
Cleanup
4a4fe31
Fix skip-unused by returning after resolving the promise.
63ba6bc
add option to include special files in the check for unused dependencies
4c09a09
Merge pull request #216 from timc13/dev-only-flag
6465645
add dev-only flag
ca73028
Merge pull request #205 from chrismbarr/add-typedefs
bf927d4
Add typedefs and reference them in the package file
1405113
Merge pull request #203 from corbinu/master
There are 22 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
In Knex, it is possible to define the connection as a single database URL, like:
{
client: 'pg',
connection: 'postgres://user:password@localhost:5432/database',
};
This is not supported by the databaseManagerFactory
, it requires that the connection
property is on the object form, like:
{
client: 'pg',
connection: {
host: 'localhost',
port: 5432,
user: 'user,
password: 'password',
database: 'database',
}
}
This makes it inconsistent with Knex. If it is too hard to pull in Knex' way of reading the config, an alternative would be to just document this shortcoming.
For what it's worth, I get the values by running RegExp on the database URL, and it works:
const [
,
user,
password,
host,
port,
database
] = /:\/\/(.*?):(.*?)@(.*?):(.*?)\/(.*)/u.exec(knexConnection);
const databaseManager = databaseManagerFactory({
knex: {
client: 'pg',
connection: {
host,
port,
user,
password,
database,
},
},
dbManager: {
...
},
});
Hi,
Have been using this package for awhile but recently started using it for seed files.
I've noticed that populateDb looks for a glob pattern of files, requires those files, and then checks to see if the module is a function. However, when generating knex seed files, the templates look like:
exports.seed = async function() {
// ..seed data here
}
Where the module being loaded in knex-db-manager is { seed: [AsyncFunction] }
. Therefore seed files aren't loading properly.
I have a commit here that fixes this, along with a fix for the wrong populatePathPattern
. Can you tell me if this is an appropriate fix or if I'm missing something here? I can open a PR if the former, as well as write a test case for it.
Thanks!
Hi,
I've been struggling to deploy the initial version of a nodejs app with Postgres on Digitalocean.
I get the
Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
ERROR on the migrateDb function call. How can I find out what exactly is happening on the knex.migrate.latest()
used within and traceback to the actual issue?
0.16.3
to 0.16.4
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
knex is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | mssql |
Current Version | 4.0.4 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mssql is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 18 commits.
85c14ff
Release 4.1.0
1581fb1
Merge pull request #510 from pkehrer/feature/supportForMultiSubnetFailover
7ffb5a0
Merge pull request #526 from davidjb/patch-1
b5bd1ad
Merge pull request #533 from wiggisser/master
fd49c61
set acquireTimeout on generic pool
23011e9
Fix links/markdown of headings
db9ea99
Merge pull request #513 from braco/patch-1
c11bb21
Small error in example code
859b03c
Fixing lint issues
d6614d4
Adding support for the MultiSubnetFailover option in connection strings
f4f5e2c
Merge pull request #476 from ajcrites/type-inference-475
5aaa0b2
Merge pull request #494 from mparq/v-miparq/msnodesqlv8-request-timeout
1639f7f
Add msnodesqlv8 timeout disclaimer to README.md
db461b1
Fix tedious test.
d8d29d3
Remove extra semicolon.
There are 18 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Hello
When I run await dbManager.createDb('my_db')
, The database is created but I get the error (node:4687) Warning: a promise was rejected with a non-error: [object Undefined]
. The instruction is in a try catch bloc.
Is there anything I should do to avoid this error?
Thank you
The examples in the knex docs uses client: 'pg'
but knex-db-manager
requires client: 'postgres'
. I'm curious about the reason for this? Could both be supported?
0.16.6
to 0.16.7
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
knex is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | nsp |
Current Version | 2.8.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As nsp is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 1 commits.
7e9db34
2.8.1 no more devDependencies in the shrinkwrap fix #185
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
If I use an invalid password knex-db-manager
gives this error, which I think can be OK. But it does not exit back to the prompt which I think is a problem.
Unhandled rejection error: password authentication failed for user "userwithrightstocreateusersanddatabases"
at Connection.parseE (C:\code\XXX\node_modules\pg\lib\connection.js:567:11)
at Connection.parseMessage (C:\code\XXXnode_modules\pg\lib\connection.js:391:17)
at Socket.<anonymous> (C:\code\XXX\node_modules\pg\lib\connection.js:129:22)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:239:11)
at Socket.Readable.push (_stream_readable.js:197:10)
at TCP.onread (net.js:588:20)
Branch | Build failing π¨ |
---|---|
Dependency | bluebird |
Current Version | 3.5.1 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
bluebird is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
Bugfixes:
PromiseRejectionEvent
to contain .reason
and .promise
properties. (#1509, #1464)The new version differs by 22 commits.
50067ec
Release v3.5.2
f290da0
Fix memory being retained until promise queue is completely empty (#1544)
ad6d763
Update benchmarks (#1539)
49da1ac
Fix a typo. (#1534)
b06106a
Fix typo in readme introduced in #1530 (#1531)
c1dc5b9
Update README.md (#1530)
e35455f
chore: clone last 5 commits (#1521)
91ae9ce
chore: add Node.js 10 (#1523)
9159472
Added a simple usage example (#1369)
39081ba
Update promise.each.md (#1479)
77781fe
Fix header (#1513)
b8eedc1
Update LICENSE to 2018 (#1490)
4163e82
Added ES6 way to import the bluebird promise (#1461)
3790a92
DOC: add direct link to Promise.delay from API ref (#1465)
e8d8525
Update error documentation (#1469)
There are 22 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | mysql |
Current Version | 2.15.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
mysql is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 58 commits.
cf5d1e3
2.16.0
7e0acb6
tests: group auth unit tests together
f83d270
docs: fix typo
12ee28b
tests: add explicit unit test for no password auth
bc9cd35
docs: wording tweaks about closing pool
13a00c8
tests: add basic auth switch helpers to unit test server
016b294
tests: add ok helper method for unit tests
b6ad520
tests: add error helper method for unit tests
6cde9eb
tests: use deny helper method
4e90574
tests: improve flexibility of auth unit tests
af0120f
tests: improve next packet determination in unit test server
5a97c2e
tests: improve SSL request detection in unit tests
10651a1
build: [email protected]
37885eb
build: [email protected]
de7cbbf
build: [email protected]
There are 58 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Reference issue (not mine) - elixir-ecto/ecto#1925
I'm using the db manager to create multiple databases at once - doing so however gets me this error
{ error: source database "template1" is being accessed by other users
at Connection.Object.<anonymous>.Connection.parseE (/root/app/node_modules/pg/lib/connection.js:567:11)
at Connection.Object.<anonymous>.Connection.parseMessage (/root/app/node_modules/pg/lib/connection.js:391:17)
at Socket.<anonymous> (/root/app/node_modules/pg/lib/connection.js:129:22)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:239:11)
at Socket.Readable.push (_stream_readable.js:197:10)
at TCP.onread (net.js:589:20)
According to the referenced issue, db creation should be done logged into the postgres
database - I'm guessing that by default it's logging in using the template1
for superuser.
The encoding is hard coded to 'utf8', which can cause a ER_COLLATION_CHARSET_MISMATCH
error.
As 'utf8' is not compatible with a number of collations, e.g. the utf8mb4 variants, some of the functions will not work.
What it should do, is to use the one in config.knex.connection.charset
if specified, alternatively we can have a new entry config.dbManager.charset
.
I am speaking in the context of MySQL because I'm not too familiar with Postgres, but I guess it's probably the same.
Example -
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If youβre interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didnβt already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didnβt touch job or matrix configurations because these tend to be quite specific and complex, and itβs difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what youβre doing it may require additional work or may not be applicable at all. Weβre also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, Iβm a humble robot and wonβt feel rejected π€
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
First of all, thanks for this great project! :)
I saw that the npm package of knex-db-manager
points to a fork of this repo, and this fork doesn't support MySQL yet.
As of now, I'm using the version of knex-db-manager
in this repo by running this:
npm i Vincit/knex-db-manager
However, it would be great if the npm was linked to this repo as opposed to the fork.
Thanks again! π
Branch | Build failing π¨ |
---|---|
Dependency | lodash |
Current Version | 4.17.4 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
lodash is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | knex |
Current Version | 0.13.0 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
knex is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 48 commits.
4005615
Bumped version up to 0.14
291bcfd
Change log update for 0.14 release
7c1a0d4
mysql stream should support query options (#2301)
74f2a03
Throw error on non-string table comment (#2126)
53314cb
Making containsUndefined check for own properties (#1711)
f66b524
Call to knex.migrate.currentVersion causes an error #2111 (#2123)
7d18837
Allow update queries in with statements. Fixes #2263. (#2298)
85d088a
Update each out-of-date dependency according to david-dm.org. (#2297)
f40d69d
Update v8flags to version 3.0.0 (#2288)
fddfd3b
Escape table name in SQLite columnInfo call (#2281)
e59cc19
Update interpret version (#2283)
d0d22e0
Track the current migration file for use in error message. Print filename of errored migration (#2272)
11536f9
Implemented select syntax: select({ alias: 'column' }) (#2227)
b092a27
Allow raw expressions in query builder aggregate methods (#2257)
9658c78
Post processing hook for query result (#2261)
There are 48 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
6.1.0
to 6.1.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
This package looks awesome and I though it would save me from the dreaded duplicate key value violates unique constraint
error.
It seems to be properly configured as I can await dbManager.createDb('some-db');
just fine.
But after inserting some seed data, I try to update the id sequences with await dbManager.updateIdSequences();
, but nothing seems to happen.
All the tables keep having have their id
sequences set to 1, which makes it impossible to insert data after seeding.
Branch | Build failing π¨ |
---|---|
Dependency | pg |
Current Version | 7.4.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
pg is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 10 commits.
a664983
Bump version
9825e7c
Use Buffer.from instead of deprecated Buffer constructor
70a8ee1
Don't repeat logic for reporting stream errors
4cf67b2
Ignore socket hangup when ending connection also with ssl (#1344).
c9ca1da
License date in README
1e48733
Update license date
6c723b2
Update SPONSORS.md
56633a5
Update SPONSORS.md
9870c86
Make tests compatible with PostgreSQL 10
0b80aba
Specify collation when relied on in tests
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
When I try to connect forcing SSL...there is no way to do this.
For backwards compatibility, this is what I propose:
Here is the change to PostgresDatabaseManager.js (around line 214):
PostgresDatabaseManager.prototype.create_masterClient = function() {
var self = this;
return new Promise(function(resolve, reject) {
let client;
if (self.config.knex.connectionPassthrough) {
client = new pg.Client(self.config.knex.connection);
} else {
client = new pg.Client(self._masterConnectionUrl());
}
client.connect(function(err) {
if (err) {
reject(err);
} else {
resolve(client);
}
});
});
};
And here is my knexfile.js:
const dotenv = require('dotenv');
const fs = require('fs');
dotenv.load();
module.exports = {
client: 'pg',
connection: {
database: process.env.DB_NAME,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
host: process.env.DB_HOST,
ssl: {
ca: fs.readFileSync('../deployment/rds-ca-2019-root.pem'),
rejectUnauthorized: true
}
},
connectionPassthrough: true,
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'migrations'
}
};
I have an issue where my the createDb()
function (on my instance of the PostgresDatabaseManager
) results in the error:
error: must be member of role "<my_db_name>"
(where "<my_db_name>" is the name of the DB I'm creating).
The error doesn't occur in my dev environment (MacOS 10.13.3 running PosgreSQL 9.6.5), only in staging, which is a AWS RDS instance running PostgreSQL 9.6.6.
The problem sounds exactly like this stackoverflow question. The accepted answer, of adding the superuser to the role created for the new DB, also works for me. Eg..
await knexDbManager.knexInstance().raw(`GRANT ${database} TO ${superUser}`);
await knexDbManager.createDb();
Might be worth adding that GRANT
statement to the createDb()
function.
Branch | Build failing π¨ |
---|---|
Dependency | knex |
Current Version | 0.12.6 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
As knex is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you itβs very likely also breaking them.
I recommend you give this issue a very high priority. Iβm sure you can resolve this πͺ
The new version differs by 33 commits .
a7c4bbe
release 0.12.7
364d23b
Update changelog for release 0.12.7
43324d7
π§ Ignore stub files in lint task (#1649)
fe4ec15
Support custom foreign key names (continued work of #1311) (#1726)
77e6733
Alter column syntax for table, implements changing type, nullability and default (#1914)
f198c7d
Allow casting when using named bindings. (#1890)
0d55cfd
More promise functions (#1896)
2fa375f
Pass rollback errors through to transaction promise in mssql dialect (#1884) (#1885)
7de07c9
ONLY keyword support for PostgreSQL (#1874)
49aa6f7
Check that oracle DB testing is enabled before running ext auth tests. Fixes #1865 (#1867)
ff4f9e2
align commands description (#1857)
a4bfee7
Ensure that 'client' is provided in knex config object (#1822)
0ae4f3e
Mssql update query generates invalid syntax (#1777)
9e7b57e
react-native doesn't handle the /index.js in browser fields (#1813)
85dcd75
Update stub examples to not use Promise.all (#1814)
There are 33 commits in total. See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
3.0.5
to 3.0.6
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
1e09691
Merge branch 'master' of https://github.com/nickmerwin/node-coveralls
d3045b4
handleInput callback include body
e55883a
COVERALLS_PARALLEL docs link update
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | mocha |
Current Version | 3.3.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.
This week's highlights:
allowUncaught
added to commandline as --allow-uncaught
(and bugfixed)--no-warnings
and --trace-warnings
flags (@sonicdoe)The new version differs by 9 commits0.
7554b31
Add Changelog for v3.4.0
9f7f7ed
Add --trace-warnings
flag
92561c8
Add --no-warnings
flag
ceee976
lint test/integration/fixtures/simple-reporter.js
dcfc094
Revert "use semistandard
directly"
93392dd
no special case for macOS running Karma locally
4d1d91d
--allow-uncaught cli option
fb1e083
fix allowUncaught in browser
4ed3fc5
Add license report and scan status
false
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | gatsby |
Current Version | 0.12.46 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As gatsby is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
The new version differs by 27 commits.
6bfe609
0.12.47
e08c393
include *.zip as static asset (#1065)
e799d68
Update example in README.md to use ES6 classes instead of React.createClass (#1042)
23becc3
Use shields.io for TravisCI build badge (#1012)
7cd0afb
Just use localhost as default host to fix HMR issue fixes #864
6e3d7c3
Add yisela.com (#951)
59094d5
Added Adarsh Pyarelal's personal website (#948)
b2453fd
Updated John Morris' website path (#947)
bc1025a
Removed dead link to ashk.io (#932)
c31161d
add Segment Blog to list of sites built with gatsby (#920)
f5e24ff
https://5minreact.audio - built with Gatsby (#917)
9c5e2b6
Add nicholaswyoung.com (#916)
f8df998
Add storybooks.js.org as sample site (#905)
a1d8499
Included Blog (#882)
6c63633
Update react mdl (#883)
There are 27 commits in total.
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
I couldn't find this on an npm search and had to write my own. These keywords should help prevent this for someone else:
Using the following dbManager config:
dbManager: {
// db manager related configuration
collate: ['latin1_swedish_ci'],
superUser: user',
superPassword: 'password'
}
Gives
ER_COLLATION_CHARSET_MISMATCH: COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8'
But there's no information on how to provide the character set
Hey there, Knex has support for UNIX sockets when socketPath
is supplied to the connection: {}
object.
The logic behind it is pretty straightforward, when socketPath
is detected it ignores the host
and port
.
As this uses Knex I think it would be useful to add it. There are a lot of performance benefits to using sockets instead of TCP.
Happy to do this myself if you are accepting PRs.
Thoughts appreciated
βοΈ Greenkeeperβs updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing π¨ |
---|---|
Dependency | npm-check |
Current Version | 5.5.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
npm-check is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
49d0071
5.6.0
665365a
Merge pull request #280 from markus-wi/master
094ec48
Update README --update-all option
098b721
add update-all flag
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | glob |
Current Version | 7.1.2 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
glob is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Apologies for the barrage of truncateDb
bugs!
After applying my workaround, I was able to bypass #83. I ran the command in Ubuntu and I was able to get the truncation to work!
I ran the same command on macOS, and it does not do the truncation π±
I started doing some debugging, and I logged out the result of tableNames
from https://github.com/Vincit/knex-db-manager/blob/master/lib/MySqlDatabaseManager.js#L133
[
RowDataPacket { TABLE_NAME: 'article' },
RowDataPacket { TABLE_NAME: 'article_history' },
RowDataPacket { TABLE_NAME: 'knex_migrations' },
RowDataPacket { TABLE_NAME: 'knex_migrations_lock' },
RowDataPacket { TABLE_NAME: 'topic' },
RowDataPacket { TABLE_NAME: 'user' }
]
The output returned seems to an object array with upper case TABLE_NAME
as the key name, while the map
is looking for the lowercase table_name
, which causes tableNames
to be an empty array.
Currently, the only workaround I can see for this is to do add an alias as
to the select query:
this._cachedTableNames = knex('information_schema.tables')
// ππ Force knex to return lowercase `table_name`
.select('table_name AS table_name')
.where('table_schema', config.knex.connection.database)
// .. other stuff
Can you think of any other workarounds? Do you think something could be wrong with the MySQL macOS installation on my Mac?
Currently at least populatePathPattern is missing. Some other might be missing too.
2.17.0
to 2.17.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
mysql is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
33cb884
2.17.1
f0cb4bb
docs: expand pool acquireTimeout option docs
5e96be5
Update bignumber.js to 7.2.1
9f1a655
build: [email protected]
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Package 'pg-escape' is missing in package.json of this module:
Error: Cannot find module 'pg-escape'
What's the deal with mssql? How come its not supported?
Each of my database tests have the following:
beforeEach(done => {
dbManager.truncateDb(['knex_migrations', 'knex_migrations_lock']).then(() => done());
})
afterEach(done => {
dbManager.close().then(() => done());
})
However, I'm seeing a whole lost of processes still running:
β― los feature/teardown-everything* ps aux | ack postgres
et 29148 0.0 0.0 2610452 3488 ?? Ss 11:33AM 0:00.00 postgres: et los_test 127.0.0.1(59912) idle
et 29147 0.0 0.0 2618644 4348 ?? Ss 11:33AM 0:00.00 postgres: et los_test 127.0.0.1(59911) idle
et 29024 0.0 0.0 2635028 6152 ?? Ss 11:33AM 0:00.01 postgres: et los_test 127.0.0.1(59898) idle
et 29023 0.0 0.0 2643220 6052 ?? Ss 11:33AM 0:00.01 postgres: et los_test 127.0.0.1(59897) idle
et 89814 0.0 0.1 2653972 9488 ?? Ss Tue06PM 0:00.63 postgres: et los_test ::1(59210) idle
et 59583 0.0 0.0 2626836 548 ?? Ss Fri11AM 0:00.01 postgres: et los_test 127.0.0.1(58241) idle
et 59582 0.0 0.0 2626836 532 ?? Ss Fri11AM 0:00.01 postgres: et los_test 127.0.0.1(58240) idle
et 59581 0.0 0.0 2626836 544 ?? Ss Fri11AM 0:00.01 postgres: et los_test 127.0.0.1(58239) idle
et 59580 0.0 0.0 2618644 548 ?? Ss Fri11AM 0:00.01 postgres: et los_test 127.0.0.1(58238) idle
et 54969 0.0 0.0 2635028 544 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(57001) idle
et 54968 0.0 0.0 2626836 552 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(57000) idle
et 54964 0.0 0.0 2635028 556 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(56995) idle
et 54963 0.0 0.0 2618644 568 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(56994) idle
et 54960 0.0 0.0 2635028 556 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(56991) idle
et 54959 0.0 0.0 2643220 588 ?? Ss 26Jan18 0:00.02 postgres: et los_test 127.0.0.1(56990) idle
et 54491 0.0 0.0 2610452 544 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(56606) idle
et 54490 0.0 0.0 2618644 548 ?? Ss 26Jan18 0:00.01 postgres: et los_test 127.0.0.1(56605) idle
Am I doing the setup and teardown properly?
DB passwords that contain non-URL-safe characters (e.g. hash marks) must be encoded so that pg can properly parse the connection string. Wrapping them in encodeURIComponent()
should do the trick.
Nice lib, just checking it out for my needs to initialize databases that use knex migrations.
I noticed the reposiotry
field in package.json
is pointing to a fork rather than this repo. So for example the number of issues here is not reflected at npmjs.org. Just wanted to check if that is correct?
7.10.0
to 7.11.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
pg is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
61cc3d2
Bump version
697bdae
Update changelog
0993e4b
Added the missing connect_timeout and keepalives_idle config parameters (#1847)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
I am using knex-db-manager
's truncateDb
method to remove data after every test. I noticed that when used in conjunction with Objection's knexSnakeCaseMappers
, truncateDb
does not actually do anything!
I believe this is happening is because of hard-coding of 'table_name'
here, while knex is returning 'tableName'
- https://github.com/Vincit/knex-db-manager/blob/master/lib/MySqlDatabaseManager.js#L134
Currently, I am removing the fields returning by knexSnakeCaseMappers
when I pass knex config into the dbManager's config.
const { omit } = require('lodash')
const { knexSnakeCaseMappers } = require('objection')
// This file has knexSnakeCaseMappers spread into it
// {
// // other config props
// ....knexSnakeCaseMappers()
// }
const knexConfig = require('./knexfile')
const dbManager = require('knex-db-manager').databaseManagerFactory({
knex: omit(knexConfig, Object.keys(knexSnakeCaseMappers())),
dbManager: {...}
})
Is there any other way of dealing with this? Thank you!
I'd be happy to brainstorm and potentially add a PR, if necessary!
3.0.2
to 3.0.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
As suggested by NPM and Snyk.
The new version differs by 1 commits.
aa2519c
dependency security audit fixes from npm & snyk (#210)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.