Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
356270857f |
6 changed files with 11 additions and 12 deletions
|
@ -3,13 +3,14 @@ package main
|
|||
import (
|
||||
"database/sql"
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"git.katuwoss.dev/JustScreaMy/secret-santa/internal/app"
|
||||
"git.katuwoss.dev/JustScreaMy/secret-santa/internal/config"
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/jackc/pgx/v5/stdlib"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,11 +3,12 @@ package config
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/go-playground/validator/v10"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE IF EXISTS users;
|
|
@ -1,10 +1,6 @@
|
|||
-- +migrate Up
|
||||
CREATE TABLE users (
|
||||
id INTEGER PRIMARY KEY,
|
||||
id UUID PRIMARY KEY,
|
||||
first_name VARCHAR(64) NOT NULL,
|
||||
last_name VARCHAR(64) NOT NULL,
|
||||
email VARCHAR(128) NOT NULL
|
||||
);
|
||||
|
||||
-- +migrate Down
|
||||
DROP TABLE IF EXISTS users;
|
||||
);
|
|
@ -1,8 +1,8 @@
|
|||
version: "2"
|
||||
sql:
|
||||
- engine: sqlite
|
||||
queries: sql/queries/
|
||||
schema: sql/migrations/
|
||||
- engine: postgresql
|
||||
queries: sql/queries/postgres/
|
||||
schema: sql/migrations/postgres/
|
||||
gen:
|
||||
go:
|
||||
package: "queries"
|
||||
|
|
Loading…
Reference in a new issue