Created
March 7, 2017 02:28
-
-
Save ramontayag/2efaba810f1ccfd0815ff5b0bd201ec9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
postgres=# \d+ operations | |
Table "public.operations" | |
Column | Type | Modifiers | Storage | Stats target | Description | |
-----------------+-----------------------------+---------------------------------------------------------+----------+--------------+------------- | |
id | integer | not null default nextval('operations_id_seq'::regclass) | plain | | | |
external_id | character varying | not null | extended | | | |
ledger_sequence | integer | not null | plain | | | |
body | jsonb | not null default '"{}"'::jsonb | extended | | | |
created_at | timestamp without time zone | not null | plain | | | |
updated_at | timestamp without time zone | not null | plain | | | |
Indexes: | |
"operations_pkey" PRIMARY KEY, btree (id) | |
"index_operations_on_external_id" UNIQUE, btree (external_id) | |
Referenced by: | |
TABLE "reports" CONSTRAINT "fk_rails_07d9ddd11f" FOREIGN KEY (operation_id) REFERENCES operations(id) |
This file contains hidden or 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
postgres=# select * from operations where body ->> 'id' = '12884905987'; | |
id | external_id | ledger_sequence | body | created_at | updated_at | |
----+-------------+-----------------+------+------------+------------ | |
(0 rows) |
This file contains hidden or 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
postgres=# select * from operations; | |
id | external_id | ledger_sequence | body | |
----+-------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------- | |
1 | 12884905985 | 3 | "{\"id\":\"12884905985\",\"paging_token\":\"12884905985\", ...removed for brevity | |
2 | 12884905986 | 3 | "{\"id\":\"12884905986\",\"paging_token\":\"12884905986\", ...removed for brevity | |
3 | 12884905987 | 3 | "{\"id\":\"12884905987\",\"paging_token\":\"12884905987\", ...removed for brevity | |
(3 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment