CodeForAfrica / CodeForAfrica/HURUmap-Data

Pushing data to database

Open
#6 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

A better migration could be used but for now I manually run each script using TablePlus and sometimes I use this script:
```js
const fs = require("fs");
const knex = require("knex")({ client: "postgres" });

(async () => {
await new Promise.all(
fs
.readdirSync("./sql")
.map(async (filename) =>
knex.raw(fs.readFileSync(`./sql/${filename}`).toString())
)
);
})();
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.