FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
neverstew
neverstewmigrate
Public
Like
migrate
Home
Code
2
README.md
S
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Val Town Migrations

By calling this val, you can easily handle migrations in your Val Town Turso Database.

Getting started

Capture-2023-09-14-191958.png

  1. Make sure you have your Val Town API Token saved in your secrets. See more about authentication to understand how to generate a token.
  2. Make sure you've set up your turso database
  3. 👆Fork this val

How it works

Each time the val is run, a new migration will be created and tracked in your database in the migrations table.

There will be one migration per val, per version.

You can do anything you want in the function passed to migrate; create or alter tables, populate data... whatever!

Migrating backwards

Vals don't have the concept of decreasing versions and neither does this migration tool. Made a mistake? Write a new version of your val to fix it!

Migrated from folder: kysely/migrations/migrate

Code
README.md
S
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.