3.2.8 • Published 3 years ago

@energyweb/migrations v3.2.8

Weekly downloads
30,981
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

@energyweb/migrations

This repository is used to deploy all the contracts and migrate configuration and seed data for the Origin project of the Energy Web Foundation.

Running

Command line options:

  -c, --config <config_file_path>  path to the config file
  -s, --seed-file <seed_sql_path>  path to the SQL file that will be used for seeding the database
  -e, --env <env_file_path>        path to the .env file or system variables when not set

In a development mode use:

yarn start <options>

Required configuration variables

  • WEB3 - web3 endpoint url
  • DEPLOY_KEY - private key to be used for smart contracts deployment
  • DATABASE_URL - formatted as postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...] - has precedence over DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE
  • DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE - database connection details

Default configuration

Note: When no DATABASE_URL and DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE provided, the migration program will default to:

DB_HOST = 'localhost'
DB_PORT = 5432
DB_USERNAME = 'postgres'
DB_PASSWORD = 'postgres'
DB_DATABASE = 'origin'

Migrations program will read the .env file and process.env by default, this location of .env file can be specified using -e switch

Migrations

Migrations project requires the database schema and tables to be migrated before.

Migrations will check the existence of the configuration tables in the provided database connection parameters. Process will perform:

  • deploy issuer and registry contracts from @energyweb/issuer package
  • stores initial configuration from provided -c JSON file path
  • stores the demo/seed data from provided -s sql file
3.2.6

3 years ago

3.2.5

3 years ago

3.2.8

3 years ago

3.2.7

3 years ago

3.2.4

4 years ago

3.2.3

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.10

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.1.0

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago