refactor: déplacer schema vers sql/schema.sql et sql.Schema()
This commit is contained in:
parent
e945907771
commit
40dcd82e54
5 changed files with 20 additions and 10 deletions
|
@ -2,15 +2,6 @@ package models
|
|||
|
||||
import "time"
|
||||
|
||||
var Schema = `
|
||||
CREATE TABLE IF NOT EXISTS transactions (
|
||||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
membre_id VARCHAR(7),
|
||||
given_at TIMESTAMP,
|
||||
is_perpetual BOOLEAN
|
||||
);
|
||||
`
|
||||
|
||||
type Transaction struct {
|
||||
ID string `db:"id" json:"id"`
|
||||
MembreID string `db:"membre_id" json:"membre_id"`
|
||||
|
|
Reference in a new issue