mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-20 13:28:34 +02:00
In this commit we define the schema for the `actions` table along with various queries we will need for interacting with the table. NOTE: we will also add some of our own queries manually in commits to follow.
15 lines
444 B
SQL
15 lines
444 B
SQL
-- name: InsertAction :one
|
|
INSERT INTO actions (
|
|
session_id, account_id, macaroon_identifier, actor_name, feature_name, action_trigger,
|
|
intent, structured_json_data, rpc_method, rpc_params_json, created_at,
|
|
action_state, error_reason
|
|
) VALUES (
|
|
$1, $2, $3, $4, $5, $6,
|
|
$7, $8, $9, $10, $11, $12, $13
|
|
) RETURNING id;
|
|
|
|
-- name: SetActionState :exec
|
|
UPDATE actions
|
|
SET action_state = $1,
|
|
error_reason = $2
|
|
WHERE id = $3;
|