Browse Source

First run

main
ddangelorb 3 years ago
parent
commit
c5575cdc01
  1. 4
      db/ddl.sql
  2. 2
      load/README.md

4
db/ddl.sql

@ -26,13 +26,13 @@ CREATE TABLE IF NOT EXISTS users_rolesprovider_activationkey (
roles_id INT NOT NULL,
activationkey uuid NOT NULL,
FOREIGN KEY (users_id) REFERENCES users (id),
FOREIGN KEY (roles_id) REFERENCES roles (id),
FOREIGN KEY (roles_id) REFERENCES roles (id)
);
CREATE TABLE IF NOT EXISTS educemaden_organizations (
id INT NOT NULL,
active VARCHAR(20) NULL,
name VARCHAR(255) NOT NULL
name VARCHAR(255) NOT NULL,
creation_date varchar(50) NULL,
inep_code varchar(100) NULL,
phone varchar(100) NOT NULL,

2
load/README.md

@ -13,6 +13,6 @@ Once the project setup was finished successfully, follow the steps below:
```console
$ psql -d wpdauth -c "TRUNCATE TABLE educemaden_organizations;"
$ psql -c wpdauth "COPY educemaden_organizations FROM 'educacao.cemaden-organization-dump.csv' DELIMITER ',' CSV HEADER;"
$ psql -d wpdauth -c "COPY educemaden_organizations FROM '/<absolute path>/educacao.cemaden-organization-dump.csv' DELIMITER ',' CSV HEADER;"
$ psql -d wpdauth -c "SELECT * FROM educemaden_organizations;"
```
Loading…
Cancel
Save