Opinionated tool for database structure management and migrations

trek

Requirements

At least version 13 of postgres is needed.

Installation

go install .

Setup

Create config.yaml:

model_name: <model_name>
db_name: <db_name>
db_users:
  - <db_user_1>
  - <db_user_2>

Create <model_name>.dbm using pgModeler.

Initial migration

trek generate -i

Further migrations

trek generate 002_some_migration

Applying the migrations

Take a look at the example/ directory.

Similar Resources

Django style fixtures for Golang's excellent built-in database/sql library.

go-fixtures Django style fixtures for Golang's excellent built-in database/sql library. Currently only YAML fixtures are supported. There are two rese

Sep 26, 2022

Minimalistic database migration helper for Gorm ORM

Gormigrate Gormigrate is a minimalistic migration helper for Gorm. Gorm already has useful migrate functions, just misses proper schema versioning and

Dec 25, 2022

Dead simple Go database migration library.

Dead simple Go database migration library.

migrator Dead simple Go database migration library. Features Simple code Usage as a library, embeddable and extensible on your behalf Support of any d

Nov 9, 2022

goydb, a couchdb compatible embeddable database written in go

goydb, a couchdb compatible embeddable database written in go

goydb, a couchdb compatible embeddable database written in go Getting started (not embedded) Using docker mkdir data docker run -e GOYDB_ADMINS=admin:

Sep 14, 2022

mini tools handling migrasion database from cli

mini tools handling migrasion database from cli

Dec 13, 2021

Database migration through structures - development

goMigration 基于 Golang 的数据库迁移工具,目前仍在开发中,有兴趣的小伙伴可以联系我一起~ 食用方法 go get https://github.com/DGuang21/goMigration 手动将其安装 可通过 gom gen create_c_user_table 方法生

Dec 2, 2021

A migration engine to deploy database changes in your golang + mongodb app.

bisonmigration A migration engine to deploy database changes in your golang + mongodb app. Migration files register their UP and DOWN functions in the

Jan 30, 2022

Simple Migration Tool - written in Go

Pravasan Simple Migration tool intend to be used for any languages, for any db. Please feel free to criticize, comment, etc. Currently this is working

Sep 26, 2022

SQL schema migration tool for Go.

sql-migrate SQL Schema migration tool for Go. Based on gorp and goose. Using modl? Check out modl-migrate. Features Usable as a CLI tool or as a libra

Jan 2, 2023
Comments
  • 同学,您这个项目引入了510个开源组件,存在6个漏洞,辛苦升级一下

    同学,您这个项目引入了510个开源组件,存在6个漏洞,辛苦升级一下

    检测到 stack11/trek 一共引入了510个开源组件,存在6个漏洞

    漏洞标题:jwt-go 安全漏洞
    缺陷组件:github.com/dgrijalva/[email protected]+incompatible
    漏洞编号:CVE-2020-26160
    漏洞描述:jwt-go是个人开发者的一个Go语言的JWT实现。
    jwt-go 4.0.0-preview1之前版本存在安全漏洞。攻击者可利用该漏洞在使用[]string{} for m[\"aud\"](规范允许)的情况下绕过预期的访问限制。
    影响范围:(∞, 4.0.0-preview1)
    最小修复版本:4.0.0-preview1
    缺陷组件引入路径:github.com/stack11/trek@->github.com/dgrijalva/[email protected]+incompatible
    

    另外还有6个漏洞,详细报告:https://mofeisec.com/jr?p=adffe5

  • Implement trek check

    Implement trek check

    closes https://github.com/stack11/trek/issues/55
    closes https://github.com/stack11/trek/issues/52
    closes https://github.com/stack11/trek/issues/47
    closes https://github.com/stack11/trek/issues/41
    closes https://github.com/stack11/trek/issues/17
    closes https://github.com/stack11/trek/issues/16

  • Implement `trek check`

    Implement `trek check`

    Should check all of https://github.com/stack11/trek/issues/47 https://github.com/stack11/trek/issues/41 https://github.com/stack11/trek/issues/17 https://github.com/stack11/trek/issues/16 https://github.com/stack11/trek/issues/55

    And add a hook so users can do custom validation (like checking if a readonly user has access to everything).

    Checking should also be performed by default every time after generating a migration.

Database migrations. CLI and Golang library.

Database migrations written in Go. Use as CLI or import as library.

May 30, 2021
Tool to handle versioned migrations with gorm

GORM Migrations About Gorm Migrations Gorm Migrations is a tool designed for go-gorm. Gorm Migration takes the pain out of development of migrations v

Mar 14, 2022
A Go package to help write migrations with go-pg/pg.

go-pg-migrations A Go package to help write migrations with go-pg/pg. Usage Installation Because go-pg now has Go modules support, go-pg-migrations al

Oct 16, 2022
GitHub's Online Schema Migrations for MySQL
GitHub's Online Schema Migrations for MySQL

gh-ost GitHub's online schema migration for MySQL gh-ost is a triggerless online schema migration solution for MySQL. It is testable and provides paus

Apr 3, 2020
Dbmate is a database migration tool, to keep your database schema in sync across multiple developers and your production servers.

Dbmate is a database migration tool, to keep your database schema in sync across multiple developers and your production servers. It is a stand

Jan 1, 2023
A simple database migration tool using an sql.DB connection and fs.FS for the migration source

A simple database migration tool using an sql.DB connection and fs.FS for the migration source. It has no non-test dependencies.

Dec 7, 2022
Goose database migration tool - fork of https://bitbucket.org/liamstask/goose

goose Goose is a database migration tool. Manage your database schema by creating incremental SQL changes or Go functions. Goals of this fork github.c

Dec 30, 2022
A database migration tool written in Go.

dbmagritte created by Austin Poor A database migration tool written in Go. Usage Commands: init: Set up the repo by creating a .dbmagritte.yaml file a

Jan 29, 2022
Schema management CLI for MySQL
Schema management CLI for MySQL

Skeema is a tool for managing MySQL tables and schema changes in a declarative fashion using pure SQL. It provides a CLI tool allowing you to: Export

Dec 27, 2022
Database schema evolution library for Go

Try browsing the code on Sourcegraph! Darwin Database schema evolution library for Go Example package main import ( "database/sql" "log" "github.

Dec 5, 2022