https://github.com/alexyslozada/migrations
Permite ejecutar los archivos .sql de migraciones en cualquier base de datos
https://github.com/alexyslozada/migrations
go golang migrations sql
Last synced: 4 months ago
JSON representation
Permite ejecutar los archivos .sql de migraciones en cualquier base de datos
- Host: GitHub
- URL: https://github.com/alexyslozada/migrations
- Owner: alexyslozada
- Created: 2018-08-23T20:06:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-10-06T00:36:16.000Z (over 3 years ago)
- Last Synced: 2025-08-14T12:43:10.828Z (10 months ago)
- Topics: go, golang, migrations, sql
- Language: Go
- Size: 13.7 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# migrations
Permite ejecutar los archivos .sql de migraciones en cualquier base de datos
## Uso
```bash
$ go get -u github.com/alexyslozada/migrations/...
$ cd $GOPATH/src/github.com/alexyslozada/migrations
$ cp configuration.json.example configuration.json
// Edita el archivo configuration.json para que apunte a tu base de datos.
$ go build
$ ./migrations -config=/path/to/your/configuration.json -migration=/path/to/you/directory/contains/sql-files/
```
Los flag -config y -migration son obligatorios. -config indica dónde se encuentra el archivo configuration.json y el flag -migration indica dónde se encuentran los archivos sql de tus migraciones.
## Configuration.json
Este archivo contiene la información necesaria para la conexión a la base de datos.
Copia y pega el archivo `configuration.json.example` en un archivo `configuration.json` y edita su contenido para la correcta conexión a la base de datos.