Skip to content

Instantly share code, notes, and snippets.

View ferbncode's full-sized avatar
👋

Suyash Garg ferbncode

👋
View GitHub Profile
-- Automatically generated, do not edit.
-- release_group 8ef859e3-feb2-4dd1-93da-22b91280d768
SET client_min_messages TO 'warning';
-- Temporarily drop triggers.
DROP TRIGGER deny_deprecated ON link;
ALTER TABLE medium DISABLE TRIGGER ALL;INSERT INTO area (begin_date_day, begin_date_month, begin_date_year, comment, edits_pending, end_date_day, end_date_month, end_date_year, ended, gid, id, last_updated, name, type) VALUES
(NULL, NULL, NULL, '', 0, NULL, NULL, NULL, '0', '489ce91b-6658-3307-9877-795b68554c98', 222, '2013-06-15 18:06:39.59323+00', 'United States', 1),
@ferbncode
ferbncode / a.sql
Created July 19, 2017 10:27
Generated SQL
-- Automatically generated, do not edit.
-- place d71ffe38-5eaf-426b-9a2e-e1f21bc84609
SET client_min_messages TO 'warning';
-- Temporarily drop triggers.
DROP TRIGGER deny_deprecated ON link;
INSERT INTO place (address, area, begin_date_day, begin_date_month, begin_date_year, comment, coordinates, edits_pending, end_date_day, end_date_month, end_date_year, ended, gid, id, last_updated, name, type) VALUES
('Verkatehtaankuja 7, FI-13200 Hämeenlinna, Finland', 9598, NULL, NULL, 2009, '', '(60.997758,24.477142)', 0, NULL, NULL, NULL, '0', 'd71ffe38-5eaf-426b-9a2e-e1f21bc84609', 955, '2013-11-08 19:31:00.585275+00', 'Suisto', 2);
Error at statement:
INSERT INTO place (address, area, begin_date_day, begin_date_month, begin_date_year, comment, coordinates, edits_pending, end_date_day, end_date_month, end_date_year, ended, gid, id, last_updated, name, type) VALUES
('Verkatehtaankuja 7, FI-13200 Hämeenlinna, Finland', 9598, NULL, NULL, 2009, '', '(60.997758,24.477142)', 0, NULL, NULL, NULL, '0', 'd71ffe38-5eaf-426b-9a2e-e1f21bc84609', 955, '2013-11-08 19:31:00.585275+00', 'Suisto', 2)
(IntegrityError) insert or update on table "place" violates foreign key constraint "place_fk_type"
DETAIL: Key (type)=(2) is not present in table "place_type".
"\n\nINSERT INTO place (address, area, begin_date_day, begin_date_month, begin_date_year, comment, coordinates, edits_pending, end_date_day, end_date_month, end_date_year, ended, gid, id, last_updated, name, type) VALUES\n\t('Verkatehtaankuja 7, FI-13200 Hämeenlinna, Finland', 9598, NULL, NULL, 2009, '', '(60.997758,24.477142)', 0, NULL, NULL, NULL, '0', 'd71ffe38-5eaf-426b-9a2e-e1f21bc84609', 95
Freso: I might not be able to make it to the meeting tonight.
(travelling back to college, so not sure about the network in train.)
Here is my review for this week:
https://gist.github.com/ferbncode/66c6ac9c3f9e7f5377ba0c297e77b1f4
Thanks :)
@ferbncode
ferbncode / review
Created July 17, 2017 02:27
Jul 17, 2017
Hi :)
This week i worked on my PR https://github.com/metabrainz/critiquebrainz/pull/121 .
Other than that, I tried some things to set the test database (some issues there, working on them).
Couldn't do much as I was sick all week. :(. Will cover things up this week for sure :)
@ferbncode
ferbncode / error
Created July 13, 2017 08:20
Failed query (fetching releases)
perl dump-entities-sql.pl release_group 8ef859e3-feb2-4dd1-93da-22b91280d768
-- Automatically generated, do not edit.
-- release_group 8ef859e3-feb2-4dd1-93da-22b91280d768
SET client_min_messages TO 'warning';
-- Temporarily drop triggers.
DROP TRIGGER deny_deprecated ON link;
ALTER TABLE medium DISABLE TRIGGER ALL;INSERT INTO area (begin_date_day, begin_date_month, begin_date_year, comment, edits_pending, end_date_day, end_date_month, end_date_year, ended, gid, id, last_updated, name, type) VALUES
@ferbncode
ferbncode / entity: place
Last active July 13, 2017 08:08
4352063b-a833-421b-a420-e7fb295dece0
-- Automatically generated, do not edit.
-- place 4352063b-a833-421b-a420-e7fb295dece0
SET client_min_messages TO 'warning';
-- Temporarily drop triggers.
DROP TRIGGER deny_deprecated ON link;
INSERT INTO place (address, area, begin_date_day, begin_date_month, begin_date_year, comment, coordinates, edits_pending, end_date_day, end_date_month, end_date_year, ended, gid, id, last_updated, name, type) VALUES
('Kensington Gore, London SW7 2AP', 3893, NULL, NULL, 1871, '', '(51.500944,-0.177436)', 0, NULL, NULL, NULL, '0', '4352063b-a833-421b-a420-e7fb295dece0', 729, '2013-10-18 18:54:01.525405+00', 'Royal Albert Hall', 2);
@ferbncode
ferbncode / Jenkins Error
Created July 7, 2017 13:41
Build fails
Error Message
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "musicbrainz_db" to address: Name or service not known
Stacktrace
self = Engine(postgresql://musicbrainz:***@musicbrainz_db:5432/musicbrainz_db)
fn = <bound method Pool.connect of <sqlalchemy.pool.NullPool object at 0x7f48e37ff4a8>>
connection = None
@ferbncode
ferbncode / intro
Last active June 27, 2017 18:20
using docker-compose -f docker/docker.compose.dev.yml up --build
Introduction
============
Setting up the server
---------------------
You can set up CritiqueBrainz server using `Docker <https://www.docker.com/>`_. It
requires minimum amount of configuration.
Configuration
@ferbncode
ferbncode / docker-compose -f docker-compose.dev.yml up --build
Last active June 28, 2017 04:16
docker-compose -f docker-compose.dev.yml up --build
➜ critiquebrainz git:(master) ✗ docker-compose -f docker/docker-compose.dev.yml up --build
Building db
Step 1/2 : FROM postgres:9.5.4
---> 2417ea518abc
Step 2/2 : ADD create_extensions.sql /docker-entrypoint-initdb.d/
---> Using cache
---> 8d41a43b5b71
Successfully built 8d41a43b5b71
Successfully tagged docker_db:latest
Building db_test