* started schema * db schemas beginning * first db schema gen * added sqlc generation with go generate and sqlite driver * i think these dependencies are needed * added IF NOT EXISTS to create and CRUD for each table * fixed missing columns * added missing field * fixed code generation with sqlc
18 lines
422 B
SQL
18 lines
422 B
SQL
-- name: CreateArtistCreditArtist :one
|
|
INSERT INTO artist_credit_artist (artist_id, credit_id) VALUES (?, ?)
|
|
RETURNING *;
|
|
|
|
-- name: GetArtistCreditArtist :one
|
|
SELECT * FROM artist_credit_artist
|
|
WHERE id = ? LIMIT 1;
|
|
|
|
-- name: UpdateArtistCreditArtist :exec
|
|
UPDATE artist_credit_artist
|
|
SET artist_id = ?, credit_id = ?
|
|
WHERE id =?;
|
|
|
|
-- name: DeleteArtistCreditArtist :exec
|
|
DELETE FROM artist_credit_artist
|
|
WHERE id =?;
|
|
|