chore: bootstrap independent git workflow
Some checks failed
release-smoke / macos-13 / x86_64-apple-darwin (push) Has been cancelled
release-smoke / ubuntu-latest / x86_64-unknown-linux-gnu (push) Has been cancelled
release-smoke / windows-latest / x86_64-pc-windows-msvc (push) Has been cancelled

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Paperclip CTO
2026-03-26 03:49:06 +00:00
commit 7424491944
60 changed files with 7793 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# Expected Results
Use these assertions when verifying `connect`, `inspect`, `query`, and `export`.
## PostgreSQL
- schema: `qa_demo`
- tables: `accounts`, `tickets`
## MySQL
- database: `qa_demo`
- tables: `accounts`, `tickets`
## SQLite
- file: `examples/tmp/dbtool-demo.sqlite`
- tables: `accounts`, `tickets`
## Shared Data Assertions
- `accounts` row count: `3`
- `tickets` row count: `4`
- open tickets: `3`
- closed tickets: `1`
- at least one `NULL` value exists in `tickets.notes`
- at least one multilingual value exists in `accounts.display_name`
- export query returns `4` rows ordered by `ticket_id`

View File

@@ -0,0 +1,35 @@
DROP DATABASE IF EXISTS qa_demo;
CREATE DATABASE qa_demo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON qa_demo.* TO 'dbtool'@'%';
FLUSH PRIVILEGES;
USE qa_demo;
CREATE TABLE accounts (
id BIGINT PRIMARY KEY,
email VARCHAR(255) NOT NULL UNIQUE,
display_name VARCHAR(255) NULL,
is_active BOOLEAN NOT NULL,
created_at TIMESTAMP NOT NULL
);
CREATE TABLE tickets (
id BIGINT PRIMARY KEY,
account_id BIGINT NOT NULL,
title VARCHAR(255) NOT NULL,
status VARCHAR(32) NOT NULL,
notes TEXT NULL,
amount_cents INT NOT NULL,
created_at TIMESTAMP NOT NULL,
CONSTRAINT fk_tickets_account FOREIGN KEY (account_id) REFERENCES accounts(id)
);
INSERT INTO accounts (id, email, display_name, is_active, created_at) VALUES
(1, 'alice@example.com', 'Alice', TRUE, '2026-03-01 08:30:00'),
(2, 'maria@example.com', 'Máría', FALSE, '2026-03-10 09:45:00'),
(3, 'zhang@example.com', '张敏', TRUE, '2026-03-15 12:00:00');
INSERT INTO tickets (id, account_id, title, status, notes, amount_cents, created_at) VALUES
(101, 1, 'login timeout', 'open', NULL, 0, '2026-03-20 10:00:00'),
(102, 1, 'csv export mismatch', 'closed', 'fixed after re-run', 1500, '2026-03-21 11:15:00'),
(103, 2, '权限验证', 'open', 'needs DBA review', 300, '2026-03-22 15:30:00'),
(104, 3, 'emoji smoke 😀', 'open', NULL, 42, '2026-03-23 07:05:00');

View File

@@ -0,0 +1,32 @@
DROP SCHEMA IF EXISTS qa_demo CASCADE;
CREATE SCHEMA qa_demo;
SET search_path TO qa_demo;
CREATE TABLE accounts (
id BIGINT PRIMARY KEY,
email TEXT NOT NULL UNIQUE,
display_name TEXT,
is_active BOOLEAN NOT NULL,
created_at TIMESTAMPTZ NOT NULL
);
CREATE TABLE tickets (
id BIGINT PRIMARY KEY,
account_id BIGINT NOT NULL REFERENCES accounts(id),
title TEXT NOT NULL,
status TEXT NOT NULL,
notes TEXT,
amount_cents INTEGER NOT NULL,
created_at TIMESTAMPTZ NOT NULL
);
INSERT INTO accounts (id, email, display_name, is_active, created_at) VALUES
(1, 'alice@example.com', 'Alice', TRUE, '2026-03-01T08:30:00Z'),
(2, 'maria@example.com', 'Máría', FALSE, '2026-03-10T09:45:00Z'),
(3, 'zhang@example.com', '张敏', TRUE, '2026-03-15T12:00:00Z');
INSERT INTO tickets (id, account_id, title, status, notes, amount_cents, created_at) VALUES
(101, 1, 'login timeout', 'open', NULL, 0, '2026-03-20T10:00:00Z'),
(102, 1, 'csv export mismatch', 'closed', 'fixed after re-run', 1500, '2026-03-21T11:15:00Z'),
(103, 2, '权限验证', 'open', 'needs DBA review', 300, '2026-03-22T15:30:00Z'),
(104, 3, 'emoji smoke 😀', 'open', NULL, 42, '2026-03-23T07:05:00Z');

View File

@@ -0,0 +1,34 @@
PRAGMA foreign_keys = OFF;
DROP TABLE IF EXISTS tickets;
DROP TABLE IF EXISTS accounts;
PRAGMA foreign_keys = ON;
CREATE TABLE accounts (
id INTEGER PRIMARY KEY,
email TEXT NOT NULL UNIQUE,
display_name TEXT,
is_active INTEGER NOT NULL,
created_at TEXT NOT NULL
);
CREATE TABLE tickets (
id INTEGER PRIMARY KEY,
account_id INTEGER NOT NULL,
title TEXT NOT NULL,
status TEXT NOT NULL,
notes TEXT,
amount_cents INTEGER NOT NULL,
created_at TEXT NOT NULL,
FOREIGN KEY (account_id) REFERENCES accounts(id)
);
INSERT INTO accounts (id, email, display_name, is_active, created_at) VALUES
(1, 'alice@example.com', 'Alice', 1, '2026-03-01T08:30:00Z'),
(2, 'maria@example.com', 'Máría', 0, '2026-03-10T09:45:00Z'),
(3, 'zhang@example.com', '张敏', 1, '2026-03-15T12:00:00Z');
INSERT INTO tickets (id, account_id, title, status, notes, amount_cents, created_at) VALUES
(101, 1, 'login timeout', 'open', NULL, 0, '2026-03-20T10:00:00Z'),
(102, 1, 'csv export mismatch', 'closed', 'fixed after re-run', 1500, '2026-03-21T11:15:00Z'),
(103, 2, '权限验证', 'open', 'needs DBA review', 300, '2026-03-22T15:30:00Z'),
(104, 3, 'emoji smoke 😀', 'open', NULL, 42, '2026-03-23T07:05:00Z');