sunary / sqlize Goto Github PK
View Code? Open in Web Editor NEWgenerate SQL migration schema from golang models and the current SQL schema.
License: Other
generate SQL migration schema from golang models and the current SQL schema.
License: Other
A very good tool, hoping to support SQL Server, SQL ite, and more databases
This information comes from Baidu Translate
This project is awesome, I use in my own project, is there any roadmap or TODO list? I want to contribute to this project
I would like to add the option of automatically adding s to the table name, as well as the support for uppercase (adding a hump to snake conversion, which does not affect the original snake writing) for primary key/external identifiers. Our company is currently working with almost all frameworks based on Gorm, and this library table name will automatically add s. If it is necessary to define table names in each model, this is a relatively large project. Thank you very much
This information comes from Baidu Translate
It seems that sql statements cannot be generated properly when using gorm and the data table relationship is a many-to-many association.
before:
Display string `sql:"type:ENUM('center','full')"`
after:
Display string `sql:"type:ENUM('top','bottom','center','full')"`
expected sql:
ALTER TABLE `table_name` MODIFY COLUMN `display` enum('top','bottom','center','full') AFTER `previous_column`;
Currently get id in map[string]int is correctness, so I'm finding in slice:
https://github.com/sunary/sqlize/blob/master/element/table.go#L150 and
https://github.com/sunary/sqlize/blob/master/element/table.go#L163
Help me correct this and able get id in map[string]int again.
Hi,
Very nice project! I discovered sqlize on a reddit post while I was looking for a Go SQL parser implementation to incorporate into pgdiff.
Anyway, it seems the Postgres SQL output is currently still in-progress but you've done pretty much all the work already so a trivial fix is possible.
Would you be opposed to this patch? It completely fixes the issues for my current use case.
Thanks.
Hi there!
I'm trying to use this package but I am getting this error
/go/pkg/mod/github.com/sunary/[email protected]/sql-parser/postgresql.go:15:18: cannot use sql (type string) as type "github.com/auxten/postgresql-parser/pkg/sql/parser".Statements in argument to w.Walk
I'm getting this issue when I tried to compile a main.go
with the following sentence:
newMigration := sqlize.NewSqlize(sqlize.WithSqlTag("sql"), sqlize.WithMigrationFolder("./migrations"), sqlize.WithPostgresql())
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.