0.1.4 • Published 4 months ago

getme-data-migrations v0.1.4

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

Install postgres 14 Install extension PostGIS: https://download.osgeo.org/postgis/windows/pg14/ Create a database to use in .ENV Run this command in the database: CREATE EXTENSION postgis; To create migration:

npx sequelize-cli migration:generate --name [name-of-migration]

To run migrations:

npm run migrations

To reset db:

drop table "SequelizeMeta";
drop table "tables";
drop table products;
drop table users_markets;
drop table users_retails;
drop table users;
drop table markets;
drop table retails;

ENV file example

PORT=3001
API_VERSION=/api/v1
FIREBASE_API_KEY=xxxxx
FIREBASE_AUTH_DOMAIN=getme-ca69b.firebaseapp.com
FIREBASE_PROJECT_ID=getme-ca69b
FIREBASE_STORAGE_BUCKET=getme-ca69b.appspot.com
FIREBASE_MESSAGING_SENDER_ID=1111111
FIREBASE_APP_ID=1:1111111:web:ffffff
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=test
DB_PASSWORD=test
DB_NAME=getme
DB_DIALECT=postgres

To deploy locally postgis container run the follow command:

docker run -p 5432:5432 --name pggetme -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -e POSTGRES_DB=getme -d postgis/postgis

As you can see, the POSTGRES_PASSWORD, POSTGRES_USER and POSTGRES_DB variables must match with the values on ENV file.

alt text

0.1.2

4 months ago

0.1.4

4 months ago

0.1.3

4 months ago

0.1.1

6 months ago

0.1.0

6 months ago