graphql-engine/docs/graphql/manual/schema/import-database.rst.wip
2018-09-11 16:41:24 +05:30

33 lines
856 B
Plaintext

Importing a database
====================
Let's say you have a Postgres database dump with data in it, and you'd like to get instant GraphQL on it.
Step 1: Deploy Hasura on Heroku
-------------------------------
Step 2: Import dataset
----------------------
Let's use the `Chinook database <https://raw.githubusercontent.com/xivSolutions/ChinookDb_Pg_Modified/pg_names/chinook_pg_serial_pk_proper_naming.sql>`_ as an example.
.. code-block:: bash
$ wget https://raw.githubusercontent.com/xivSolutions/ChinookDb_Pg_Modified/pg_names/chinook_pg_serial_pk_proper_naming.sql
$ heroku psql -a <YOUR_APP_NAME> < chinook_pg_serial_pk_proper_naming.sql
..
..
..
CREATE INDEX
CREATE TRIGGER
CREATE TRIGGER
ALTER TABLE
CREATE INDEX
CREATE TRIGGER
ALTER TABLE
Step 3: Track tables & relationships
------------------------------------