mirror of
https://github.com/atuinsh/atuin.git
synced 2025-08-16 10:08:08 +02:00
feat: support storing, syncing and executing scripts (#2644)
* feat: add atuin-scripts crate * initial * define record types * wip * wip * mvp * add show command, make stdin work * rewrite execution to use shebang and script file ALWAYS * rename show -> get, allow fetching script only * fmt * clippy * a bunch of fixes to the edits * update lock * variables * fmt * clippy * pr feedback * fmt
This commit is contained in:
@ -0,0 +1,2 @@
|
||||
DROP TABLE scripts;
|
||||
DROP TABLE script_tags;
|
@ -0,0 +1,17 @@
|
||||
-- Add up migration script here
|
||||
CREATE TABLE scripts (
|
||||
id TEXT PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
shebang TEXT NOT NULL,
|
||||
script TEXT NOT NULL,
|
||||
inserted_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
||||
);
|
||||
|
||||
CREATE TABLE script_tags (
|
||||
id INTEGER PRIMARY KEY,
|
||||
script_id TEXT NOT NULL,
|
||||
tag TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX idx_script_tags ON script_tags (script_id, tag);
|
@ -0,0 +1,2 @@
|
||||
-- Add down migration script here
|
||||
alter table scripts drop index name_uniq_idx;
|
@ -0,0 +1,2 @@
|
||||
-- Add up migration script here
|
||||
create unique index name_uniq_idx ON scripts(name);
|
Reference in New Issue
Block a user