npm install @launchql/base32RFC4648 Base32 encode/decode in plpgsql
``sql
select base32.encode('foo');
-- MZXW6===
select base32.decode('MZXW6===');
-- foo
`
Thanks to
https://tools.ietf.org/html/rfc4648
https://www.youtube.com/watch?v=Va8FLD-iuTg
First you'll want to start the postgres docker (you can also just use docker-compose up -d):
`sh`
make up
Install modules
`sh`
yarn install
Now that the postgres process is running, install the extensions:
`sh`
make install
This basically sshs into the postgres instance with the packages/ folder mounted as a volume, and installs the bundled sql code as pgxn extensions.
Testing will load all your latest sql changes and create fresh, populated databases for each sqitch module in packages/.
`sh`
yarn test:watch
Create a new folder in packages/
`sh`
lql init
Then, run a generator:
`sh`
lql generate
You can also add arguments if you already know what you want to do:
`sh`
lql generate schema --schema myschema
lql generate table --schema myschema --table mytable
cd into packages/, and run lql package. This will make an sql file in packages/ used for CREATE EXTENSION calls to install your sqitch module as an extension.
You can also deploy all modules utilizing versioning as sqtich modules. Remove --createdb if you already created your db:
`sh``
lql deploy awesome-db --yes --recursive --createdb