Skip to content

Instantly share code, notes, and snippets.

View akhilesh26's full-sized avatar

Akhilesh Kumar akhilesh26

View GitHub Profile
WITH RECURSIVE records AS (
	SELECT shipping_line_id, MIN(total_price)  min_price
	FROM rate_detailed_fcl_freight_charges
	where origin_port_id='58eb6135c0a35f29ced559c0' and destination_port_id='58ef81f3c0a35f0983b17969' and container_type='standard' and container_size='20' and commodity='general'
	GROUP BY shipping_line_id
)
SELECT
	r.shipping_line_id,
	r.min_price,
{
"bbid": "ba446064-90a5-447b-abe5-139be547da2e",
"relationships": [
{
"id": 1626,
"typeId": 8,
"sourceBbid": "6d5c4a15-3d08-41bc-9bbf-c5fd2dbebf52",
"targetBbid": "ba446064-90a5-447b-abe5-139be547da2e",
"type": {
"id": 8,
46) achievement module
Fun Runner Achievement
should be given to someone with a revision a day for a week:
select "bookbrainz"."author_revision".* from "bookbrainz"."author_revision" inner join "bookbrainz"."revision" on "bookbrainz"."revision"."id" = "bookbrainz"."author_revision"."id" left outer join "bookbrainz"."revision_parent" on "bookbrainz"."revision_parent"."child_id" = "bookbrainz"."author_revision"."id" where "bookbrainz"."revision"."author_id" = $1 and "bookbrainz"."revision_parent"."parent_id" is null group by "author_revision"."id", "author_revision"."bbid", "revision"."id" - relation "bookbrainz.author_revision" does not exist
error: relation "bookbrainz.author_revision" does not exist
at Connection.parseE (node_modules/pg/lib/connection.js:601:11)
at Connection.parseMessage (node_modules/pg/lib/connection.js:398:19)
at Socket.<anonymous> (node_modules/pg/lib/connection.js:120:22)
at addChunk (_stream_readable.js:265:12)
at readableAddChunk (

To get changes on schema for rename entities, follow the steps:

From previous to current:

Step 1: psql -U postgres -h localhost bookbrainz -f sql/migrations/import/up.sql
Step 2: psql -U postgres -h localhost bookbrainz -f sql/migrations/2019-04/up.sql
Step 3: psql -U postgres -h localhost bookbrainz -f sql/scripts/create_triggers.sql

From current to previous:

{ id: 2921,
typeId: 10,
sourceBbid: 'a3f7fbed-49c3-4279-928b-99fde9a5689f',
targetBbid: '0cf5bbae-29aa-48af-85c4-d5287dcbd94d',
source:
{ bbid: 'a3f7fbed-49c3-4279-928b-99fde9a5689f',
dataId: 2036,
revisionId: 10046,
master: true,
annotationId: null,
Hey All!
I worked on 1 previous PR.
I opened total 8 PRs in this week.
7 PRs are merged and 1 is open for review.
Fixed some issues with the help of Mr_Monkey.
I was a good week for me.
Thankyou Mr_Monkey to guide me.
!m Mr_Monkey.
That's all from my side.
mastcoder@akhilesh ~/metabrainz/new/bookbrainz-site $ `docker-compose down`
Stopping postgres ... done
Stopping redis ... done
Stopping elasticsearch ... done
Removing bookbrainz-site ... done
Removing bookbrainz-site_startup_run_6a076393452c ... done
Removing postgres ... done
Removing redis ... done
Removing elasticsearch ... done
Removing network bookbrainz-site_default
mastcoder@akhilesh ~/metabrainz/new/bookbrainz-site $ git pull
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Total 4 (delta 3), reused 4 (delta 3), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/bookbrainz/bookbrainz-site
cc22a1d..4e9f7f2 docker-develop-fix -> origin/docker-develop-fix
Updating cc22a1d..4e9f7f2
Fast-forward
develop.sh | 3 +--
mastcoder@akhilesh ~/metabrainz/new/bookbrainz-site $ docker-compose down && docker-compose up
Stopping elasticsearch ... done
Stopping postgres ... done
Stopping redis ... done
Removing bookbrainz-site_wait_run_f7a154f7a126 ... done
Removing bookbrainz-site_wait_run_2284c5188bf1 ... done
Removing bookbrainz-site_wait_run_7ea750060b14 ... done
Removing bookbrainz-site ... done
Removing elasticsearch ... done
Removing postgres ... done
elasticsearch | [2019-01-15T13:49:07,336][INFO ][o.e.n.Node ] [DTw3TOe] version[6.3.2], pid[1], build[default/tar/053779d/2018-07-20T05:20:23.451332Z], OS[Linux/4.13.0-32-generic/amd64], JVM["Oracle Corporation"/OpenJDK 64-Bit Server VM/10.0.2/10.0.2+13]
elasticsearch | [2019-01-15T13:49:07,336][INFO ][o.e.n.Node ] [DTw3TOe] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.lTcEIfqh, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64