wip
This commit is contained in:
parent
abda13d070
commit
7f3901ddc2
8 changed files with 46 additions and 57 deletions
10
queries/queries.go
Normal file
10
queries/queries.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package queries
|
||||
|
||||
import _ "embed"
|
||||
|
||||
//go:embed schema.sql
|
||||
var sqlSchema string
|
||||
|
||||
func SQLSchema() string {
|
||||
return sqlSchema
|
||||
}
|
7
queries/schema.sql
Normal file
7
queries/schema.sql
Normal file
|
@ -0,0 +1,7 @@
|
|||
-- Schema
|
||||
CREATE TABLE IF NOT EXISTS transactions (
|
||||
given_at TIMESTAMP DEFAULT current_timestamp,
|
||||
membre_id VARCHAR(7) NOT NULL CHECK (length(membre_id) > 0),
|
||||
is_perpetual BOOLEAN NOT NULL,
|
||||
PRIMARY KEY (membre_id, is_perpetual)
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue