cahnge migration on goose
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"gigacode.inlineColor": "green"
|
||||
}
|
||||
@@ -8,6 +8,4 @@ RUN go mod tidy
|
||||
|
||||
RUN go build -o bin/api.exe cmd/main.go
|
||||
|
||||
RUN
|
||||
|
||||
ENTRYPOINT [ "bin/api.exe" ]
|
||||
@@ -1 +0,0 @@
|
||||
DROP TABLE IF EXISTS users;
|
||||
@@ -1,6 +0,0 @@
|
||||
CREATE TABLE IF NOT EXIST users(
|
||||
id UUID PRIMARY KEY,
|
||||
name VARCHAR(50) NOT NULL,
|
||||
password VARCHAR(50) NOT NULL,
|
||||
email VARCHAR(300) UNIQUE NOT NULL
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE IF NOT EXISTS users(
|
||||
id UUID PRIMARY KEY NOT NULL,
|
||||
name VARCHAR(50) NOT NULL,
|
||||
email VARCHAR(50),
|
||||
password VARCHAR(1000) NOT NULL,
|
||||
phone VARCHAR(30) NOT NULL
|
||||
);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE IF EXISTS users;
|
||||
-- +goose StatementEnd
|
||||
@@ -0,0 +1,3 @@
|
||||
GOOSE_DRIVER=postgres
|
||||
GOOSE_DBSTRING="user=postgres dbname=postgres sslmode=disable"
|
||||
GOOSE_MIGRATION_DIR=/
|
||||
Reference in New Issue
Block a user