Grégoire Delattre 8d453e9236 Cleanup SQL migrations
* upgrade the migrate package
* remove the dev migrations
* remove unused migration code
2018-02-15 12:41:00 +01:00
2018-02-15 12:41:00 +01:00
2018-02-15 12:41:00 +01:00
2018-02-15 12:41:00 +01:00
2017-06-02 20:54:40 +02:00
2016-06-11 13:54:01 +02:00
2017-03-20 14:35:40 +00:00
2018-02-15 12:41:00 +01:00
2018-02-14 22:54:20 +01:00
2018-02-15 12:41:00 +01:00
2018-02-14 22:54:20 +01:00
2018-02-14 22:54:20 +01:00

Install dependencies

Install node

You'll need node v6+, here's a link to install it: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Install yarn and dependencies

sudo npm install -g yarn
yarn install

Go tools && Dependencies

As there is no versioning yet, you need to manually go get all the packages

go get ./...

go tools:

go get -v -u github.com/pilu/fresh
go get -v -u github.com/mattes/migrate
go build -tags 'postgres' -o $GOPATH/bin/migrate github.com/mattes/migrate/cli

Dev

Check your config.yml file

Run server

make dev

Run javascript tools

yarn start

Connect to the database

docker run -it --rm -e PGPASSWORD=test --link canape_postgresql_dev:postgres postgres:9.5 psql -h postgres -U test -d dev

Setup the dev users

Connect to the database and enter this sql queries:

INSERT INTO users (name, hash, admin, activated) VALUES ('test', '$2a$10$QHx07iyuxO1RcehgtjMgjOzv03Bx2eeSKvsxkoj9oR2NJ4cklh6ue', false, true);
INSERT INTO users (name, hash, admin, activated) VALUES ('admin', '$2a$10$qAbyDZsHtcnhXhjhQZkD2uKlX72eMHsX8Hi2Cnl1vJUqHQiey2qa6', true, true);

This users are defined with this parameters: pepper: "pepper" cost: 10

Users:

  • Admin user: admin / admin
  • Test user: test / test

Run the tests

make test

To clean up

make clean

Production build

yarn build
Description
No description provided
Readme 13 MiB
Languages
Go 50.1%
JavaScript 46.1%
PLpgSQL 1.7%
Shell 1.2%
SCSS 0.8%
Other 0.1%