Created
April 6, 2020 18:28
-
-
Save koxudaxi/4a382ce846a78199fbf1bfbd8e3c0661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ knex migrate:latest | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations' ], | |
output: [Function: output] } ] | |
[ { sql: | |
'create table "knex_migrations" ("id" serial primary key, "name" varchar(255), "batch" integer, "migration_time" timestamptz)', | |
bindings: [] } ] | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations_lock' ], | |
output: [Function: output] } ] | |
[ { sql: | |
'create table "knex_migrations_lock" ("index" serial primary key, "is_locked" integer)', | |
bindings: [] } ] | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: 'd32a8ae0-7832-11ea-80da-2db845085a23', | |
sql: 'select * from "knex_migrations_lock"' } | |
{ method: 'insert', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [ 0 ], | |
__knexQueryUid: 'd32cadc0-7832-11ea-80da-2db845085a23', | |
sql: | |
'insert into "knex_migrations_lock" ("is_locked") values (?)', | |
returning: undefined } | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: 'd32e5b70-7832-11ea-80da-2db845085a23', | |
sql: 'select "name" from "knex_migrations" order by "id" asc' } | |
{ method: 'update', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [ 1, 0 ], | |
__knexQueryUid: 'd331b6d0-7832-11ea-80da-2db845085a23', | |
sql: | |
'update "knex_migrations_lock" set "is_locked" = ? where "is_locked" = ?', | |
returning: undefined } | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations' ], | |
output: [Function: output] } ] | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations_lock' ], | |
output: [Function: output] } ] | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: 'd3373510-7832-11ea-80da-2db845085a23', | |
sql: 'select * from "knex_migrations_lock"' } | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: 'd338bbb0-7832-11ea-80da-2db845085a23', | |
sql: 'select "name" from "knex_migrations" order by "id" asc' } | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: 'd339f430-7832-11ea-80da-2db845085a23', | |
sql: 'select max("batch") as "max_batch" from "knex_migrations"' } | |
[ { sql: | |
'create table "users" ("id" serial primary key, "email" varchar(255) not null, "password" varchar(255) not null, "created_at" timestamptz default CURRENT_TIMESTAMP, "updated_at" timestamptz default CURRENT_TIMESTAMP)', | |
bindings: [] } ] | |
{ method: 'insert', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: | |
[ 1, 2020-04-06T18:17:07.584Z, '202004070120_create_users.js' ], | |
__knexQueryUid: 'd33bf000-7832-11ea-80da-2db845085a23', | |
sql: | |
'insert into "knex_migrations" ("batch", "migration_time", "name") values (?, ?, ?)', | |
returning: undefined } | |
{ method: 'update', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [ 0 ], | |
__knexQueryUid: 'd33cda60-7832-11ea-80da-2db845085a23', | |
sql: 'update "knex_migrations_lock" set "is_locked" = ?', | |
~/WebstormProjects/untitled is 📦 v1.0.0 via ⬢ v10.19.0 via 🐍 v3.7.5 (python37) on ☁️ ap-northeast-1 | |
❯ knex migrate:latest | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations' ], | |
output: [Function: output] } ] | |
[ { sql: | |
'create table "knex_migrations" ("id" serial primary key, "name" varchar(255), "batch" integer, "migration_time" timestamptz)', | |
bindings: [] } ] | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations_lock' ], | |
output: [Function: output] } ] | |
[ { sql: | |
'create table "knex_migrations_lock" ("index" serial primary key, "is_locked" integer)', | |
bindings: [] } ] | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: '1135c330-7834-11ea-beb4-79f1ef845c41', | |
sql: 'select * from "knex_migrations_lock"' } | |
{ method: 'insert', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [ 0 ], | |
__knexQueryUid: '113797f0-7834-11ea-beb4-79f1ef845c41', | |
sql: | |
'insert into "knex_migrations_lock" ("is_locked") values (?)', | |
returning: undefined } | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: '1138f780-7834-11ea-beb4-79f1ef845c41', | |
sql: 'select "name" from "knex_migrations" order by "id" asc' } | |
{ method: 'update', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [ 1, 0 ], | |
__knexQueryUid: '113c04c0-7834-11ea-beb4-79f1ef845c41', | |
sql: | |
'update "knex_migrations_lock" set "is_locked" = ? where "is_locked" = ?', | |
returning: undefined } | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations' ], | |
output: [Function: output] } ] | |
[ { sql: | |
'select * from information_schema.tables where table_name = ? and table_schema = current_schema()', | |
bindings: [ 'knex_migrations_lock' ], | |
output: [Function: output] } ] | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: '114098a0-7834-11ea-beb4-79f1ef845c41', | |
sql: 'select * from "knex_migrations_lock"' } | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: '11421f40-7834-11ea-beb4-79f1ef845c41', | |
sql: 'select "name" from "knex_migrations" order by "id" asc' } | |
{ method: 'select', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [], | |
__knexQueryUid: '114330b0-7834-11ea-beb4-79f1ef845c41', | |
sql: 'select max("batch") as "max_batch" from "knex_migrations"' } | |
[ { sql: | |
'create table "users" ("id" serial primary key, "email" varchar(255) not null, "password" varchar(255) not null, "created_at" timestamptz default CURRENT_TIMESTAMP, "updated_at" timestamptz default CURRENT_TIMESTAMP)', | |
bindings: [] } ] | |
{ method: 'insert', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: | |
[ 1, 2020-04-06T18:26:01.160Z, '202004070120_create_users.js' ], | |
__knexQueryUid: '11452c80-7834-11ea-beb4-79f1ef845c41', | |
sql: | |
'insert into "knex_migrations" ("batch", "migration_time", "name") values (?, ?, ?)', | |
returning: undefined } | |
{ method: 'update', | |
options: {}, | |
timeout: false, | |
cancelOnTimeout: false, | |
bindings: [ 0 ], | |
__knexQueryUid: '1145efd0-7834-11ea-beb4-79f1ef845c41', | |
sql: 'update "knex_migrations_lock" set "is_locked" = ?', | |
returning: undefined } | |
Batch 1 run: 1 migrations | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment