Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deriegle/turso-migrate
CLI Tool for quick and easy migrations on Turso
https://github.com/deriegle/turso-migrate
Last synced: 25 days ago
JSON representation
CLI Tool for quick and easy migrations on Turso
- Host: GitHub
- URL: https://github.com/deriegle/turso-migrate
- Owner: deriegle
- Created: 2024-04-10T03:07:18.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-10T03:40:47.000Z (7 months ago)
- Last Synced: 2024-05-10T22:02:52.540Z (6 months ago)
- Language: TypeScript
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `@deriegle/turso-migrate`
This is a CLI tool to easy and quickly run SQL migrations against Turso in a predictable way.
**This tool is still currently a work in progress and is not advised to be used against a production database.**
## Commands
### Create
This command will create a new migration file in the migrations folder you specify. You can provide an optional name if you'd like to name the migration file. It will be prefixed with the current unix timestamp. If no name is provided, a random name will be generated.
```bin
Usage: @deriegle/turso-migrate create [options] [name]Create a new migration file
Arguments:
name Name of the migration fileOptions:
-f, --migrationsFolder Path to migrations folder
-h, --help display help for command
```### Migrate Command
This command will create a new migration file in the migrations folder you specify. You can provide an optional name if you'd like to name the migration file. It will be prefixed with the current unix timestamp. If no name is provided, a random name will be generated.
```bin
Usage: @deriegle/turso-migrate migrate [options]Migrates the database
Options:
-d, --databaseUrl Turso Database URL
-a, --databaseAuthToken Turso Database Auth Token
-f, --migrationsFolder Path to migrations folder
-h, --help display help for command
```### Resolve Command
This command can be used to resolve issues with migrations.
```bin
Usage: @deriegle/turso-migrate resolve [options]Updates a migration file status. This can be useful to mark a migration as complete manually or pending if you want to run it again.
Options:
-d, --databaseUrl Turso Database URL
-a, --databaseAuthToken Turso Database Auth Token
-f, --migrationsFolder Path to migrations folder
--completed Migration to mark as completed
--pending Migration to mark as pending
-h, --help display help for command
```### Status Command
This command will print a table of the status of your current migrations.
```bin
Usage: @deriegle/turso-migrate status [options]Shows the status of migrations
Options:
-d, --databaseUrl Turso Database URL
-a, --databaseAuthToken Turso Database Auth Token
-f, --migrationsFolder Path to migrations folder
-h, --help display help for command
```### Help Command
Command to print our help for available commands.
```bin
Usage: @deriegle/turso-migrate [options] [command]CLI tool to make migrations in Turso easier.
Options:
-V, --version output the version number
-h, --help display help for commandCommands:
create [options] [name] Create a new migration file
migrate [options] Migrates the database
resolve [options] Updates a migration file status. This can be useful to mark a migration as complete manually or pending if you want to
run it again.
status [options] Shows the status of migrations
help [command] display help for command
```