Initialize Xata schemas and seed initial location data into dev branch
- Create a new database in Xata
- Create a new
XATA_API_KEY
by visiting https://app.xata.io/settings - Change directory into
libs/xata
cd libs/xata
- Create a
.env
file with following values
XATA_BRANCH=dev
XATA_API_KEY='generate from https://app.xata.io/settings'
XATA_DATABASE_URL='https://{workspace-slug}.{region}.xata.sh/db/{database}'
- Allow direnv to read the .env file within the directory
direnv allow
- Create dev branch
pnpm -s dlx @xata.io/cli@latest branch create dev
- Upload the schema to dev branch
pnpm -s dlx @xata.io/cli@latest schema upload xata-schema.json --branch dev
- Seed location data into dev branch
node scripts/seed-locations.mjs dev