{"repo":"acro5piano/kysely-migration-cli","free":true,"listed":false,"github":"https://github.com/acro5piano/kysely-migration-cli","clone":"git clone https://github.com/acro5piano/kysely-migration-cli.git","description":"A thin library to create a migration script using Kysely","language":"TypeScript","stars":76,"topics":["database","kysely","migration","typescript"],"license":"MIT","category":"databases-storage","readme_excerpt":"kysely-migration-cli A lightweight migration CLI library for Kysely Installation Install using the dependency manager of your choice Usage kysely-migration-cli is a library designed to assist you in creating your own migration script. It does not aim to provide an executable command. Create a migration script as shown below: Note: The above script assumes your migration folder is located at the same directory of chdir and named ./migrations Then run: Output: Migration creation The create command generates a migration boilorplate with the current timestamp. For example, running node -r ts-node/register scripts/migrate.ts create initial creates a file named migrations/20220222T044655-initial.ts with the following code: If you want to modify the default template, you can pass an option --template=yourtemplate.txt pointing to a file containing the custom template If you want to change the path where migration files are stored, please modify the CLI code as follows: Experimental: CLI without a script file Important Notes: - This is an experimental feature, and the behavior may change in the future. - Currently, it only works with Postgres. You can run kysely-migration-cli without a script file. If you place an .env file containing DATABASE URL=postgres://... , the CLI will automatically load it before execution. To enable this, you need to install the dotenv module ( npm install dotenv ) . To transpile TypeScript, kysely-migration-cli attempts to register a transpiler using Node's","default_branch":null,"files":null,"tree":[],"storefront":"/r/acro5piano","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/acro5piano/kysely-migration-cli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}