Skip to content

Instantly share code, notes, and snippets.

@luzfcb
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luzfcb/d85b4012c55471fe3f71 to your computer and use it in GitHub Desktop.
Save luzfcb/d85b4012c55471fe3f71 to your computer and use it in GitHub Desktop.
(django1.7b4)oficina@oficina:~/schematest$ python manage.py dbshell --database=eposse
psql (9.3.4)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
eposse=# \dt
No relations found.
eposse=# \dn
List of schemas
Name | Owner
---------------+----------
legacyschema1 | postgres
public | postgres
(2 rows)
eposse=# \dt legacyschema1.*
List of relations
Schema | Name | Type | Owner
---------------+--------+-------+----------
legacyschema1 | choice | table | postgres
legacyschema1 | pull | table | postgres
(2 rows)
eposse=# \d legacyschema1.*
Table "legacyschema1.choice"
Column | Type | Modifiers
-------------+------------------------+-------------------------------------------------------------------
id | integer | not null default nextval('legacyschema1.choice_id_seq'::regclass)
poll_id | integer | not null
choice_text | character varying(200) | not null
votes | integer | not null
Indexes:
"choice_pkey" PRIMARY KEY, btree (id)
"choice_582e9e5a" btree (poll_id)
Foreign-key constraints:
"choice_poll_id_3d0280c389b7efa_fk_pull_id" FOREIGN KEY (poll_id) REFERENCES legacyschema1.pull(id) DEFERRABLE INITIALLY DEFERRED
Index "legacyschema1.choice_582e9e5a"
Column | Type | Definition
---------+---------+------------
poll_id | integer | poll_id
btree, for table "legacyschema1.choice"
Sequence "legacyschema1.choice_id_seq"
Column | Type | Value
---------------+---------+---------------------
sequence_name | name | choice_id_seq
last_value | bigint | 2
start_value | bigint | 1
increment_by | bigint | 1
max_value | bigint | 9223372036854775807
min_value | bigint | 1
cache_value | bigint | 1
log_cnt | bigint | 0
is_cycled | boolean | f
is_called | boolean | t
Owned by: legacyschema1.choice.id
Index "legacyschema1.choice_pkey"
Column | Type | Definition
--------+---------+------------
id | integer | id
primary key, btree, for table "legacyschema1.choice"
Table "legacyschema1.pull"
Column | Type | Modifiers
----------+--------------------------+-----------------------------------------------------------------
id | integer | not null default nextval('legacyschema1.pull_id_seq'::regclass)
question | character varying(200) | not null
pub_date | timestamp with time zone | not null
Indexes:
"pull_pkey" PRIMARY KEY, btree (id)
Referenced by:
TABLE "legacyschema1.choice" CONSTRAINT "choice_poll_id_3d0280c389b7efa_fk_pull_id" FOREIGN KEY (poll_id) REFERENCES legacyschema1.pull(id) DEFERRABLE INITIALLY DEFERRED
Sequence "legacyschema1.pull_id_seq"
Column | Type | Value
---------------+---------+---------------------
sequence_name | name | pull_id_seq
last_value | bigint | 1
start_value | bigint | 1
increment_by | bigint | 1
max_value | bigint | 9223372036854775807
min_value | bigint | 1
cache_value | bigint | 1
log_cnt | bigint | 0
is_cycled | boolean | f
is_called | boolean | t
Owned by: legacyschema1.pull.id
Index "legacyschema1.pull_pkey"
Column | Type | Definition
--------+---------+------------
id | integer | id
primary key, btree, for table "legacyschema1.pull"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment