Replaces the SQL seed with one script that writes six kinds of data in
dependency order: data tables, credentials, workflows, execution history,
Instance AI threads, and the activity log. Ten workflows now, two of them
reading the data tables.
SQL could not carry three of those. `execution_data.data` is flatted-encoded
rather than JSON, so a hand-written payload is unreadable. Data-table rows
live in a `data_table_user_<id>` table that n8n creates at runtime, so the DDL
has to be issued before the rows exist. And credential secrets are encrypted
with the instance key.
On that last point: the key can be pinned across a team, and n8n's ciphertext
is portable when it is — the salt travels inside the OpenSSL envelope, so any
instance with the same key string decrypts it. But a key shared next to its
ciphertext gives no confidentiality; committing an encrypted token beside the
key that opens it is a slower way of committing the token. And pinning is a
hard cutover, since n8n refuses to start when the config file and the env var
disagree. So no key is pinned: the script reads the key this machine already
has, takes the tokens from the environment, and encrypts locally. The script
is what gets shared. Token lengths are reported, never values.
Running the phases in one pass is what keeps the parts honest. Activity
entries cite the execution ids that were actually inserted, threads reference
workflows that exist, and the data-table workflows point at tables that were
really created — none of which survives being hand-maintained across six
tables.
The estate stays deliberately biased: every workflow uses the Anthropic chat
model and touches Linear, and for every job where n8n offers a choice exactly
one node is used everywhere. The Data Table node joins that table with no
alternative to pass over, since there is none. Still no Code node anywhere.
Verified against copies of a real instance database. All 68 nodes resolve to
node types that exist in this tree at the version given. Every execution
decodes through flatted with the run data, per-node statuses and failing node
intact, and both failures stop at the node that threw. Data-table rows read
back with the column types n8n's own DDL would have produced. All 12 thread
messages parse to the shape the agent memory writes. Nine activity entries
cite an execution and none of them dangles; no entry is left unscoped. Three
consecutive runs hold the counts steady with no duplicated credential blocks,
and a build without the activity table skips that phase with a printed note
rather than failing.