Comments (7)
Hi, thanks for your issue. Actually, the database/migrations/20221001000000_create_users_table.up.sql
file is only applicable to Mysql. If you want to use Postgresql, you need to change the default connection in the config/database.go
file and optimize the *.sql
file applicable to Postgresql, such as:
CREATE TABLE users(
id int PRIMARY KEY NOT NULL,
name VARCHAR
);
If you have any other questions, please contact me, thanks.
from goravel.
@hwbrzzl I did change the default connection to postgresql. So once the file is generated, I need to change the content of sql for postgresql?
from goravel.
Yup, the template that creating by go run . artisan make:migration create_users_table
is only applicable to Mysql now. We can generate a Postgresql template based on the default connection in the config/database.go
file in the future, but unfortunately, we have to change the .sql file manually now.
If you're interested, I'm very glad that you can submit a PR for that. π
from goravel.
I have done something similar for migration here https://github.com/sujit-baniya/db/blob/master/migrations/command_new.go
from goravel.
Great, stared. π
from goravel.
@hwbrzzl Do you think we could replace current go-migrate/migrate
with above?
from goravel.
If you can perfect your README, I'm glad to read it first.
from goravel.
Related Issues (20)
- π [Bug] ModelηRetrieved eventδΈδΌθ’«θ§¦ε HOT 3
- β¨ [Feature] enhance the ability of the command feature HOT 1
- π [Bug] data error when calling facades.Auth().Parse() multiple times with different guard HOT 1
- β¨ [Feature] The queue log needs to be controled by APP_DEBUG HOT 1
- π [Bug] The context that set by facades.Orm().WithContext() isn't passed to orm events HOT 1
- β¨ [Feature] Supports configuring the json serialization/deserialization package in config/app.go HOT 2
- π [Bug] Minio does not implement filesystem.Driver HOT 2
- β¨ [Feature] Use contributors api to automatically generate contributors images in README HOT 4
- π [Bug] The new line print of Log is incorrect HOT 1
- β¨ [Feature] The trace of log can be clicked as a link HOT 1
- β¨ [Feature] Add a -f flag for make commands, to avoid cover the existing file by mistake HOT 1
- β¨ [Feature] Map the Installer to the Docs HOT 2
- β¨ [Feature] DB supports configure SSL HOT 1
- π [Bug] The traces don't cleaned when calling Log.Info after Log.Error HOT 1
- π [Bug] 樑εδΊδ»Άθ·εIDε樑εδΊδ»Άθ§¦εbug HOT 7
- π [Bug] Nil pointer dereference on validation HOT 4
- β¨ [Feature] Orm implements convenient expansion of other drivers HOT 1
- β¨ [Feature] Optimize the backslash when using facades.Route().Prefix("/product") HOT 1
- β¨ [Feature] - Any support for sqlx HOT 1
- β¨ [Feature] Remove gookit/color, use pterm/pterm instead HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goravel.