mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 18:42:30 +03:00
33 lines
856 B
Plaintext
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
|
|
------------------------------------
|
|
|
|
|