import { Maximize2, Minimize2, Terminal } from 'lucide-react' import { useState } from 'react' import { useParams } from 'common' import CommandRender from 'components/interfaces/Functions/CommandRender' import { cn, Collapsible } from 'ui' const MigrationsEmptyState = () => { const { ref } = useParams() const [showInstructions, setShowInstructions] = useState(false) const commands = [ { comment: 'Link your project', command: `supabase link --project-ref ${ref}`, jsx: () => { return ( <> supabase link --project-ref {ref} > ) }, }, { comment: 'Create a new migration called "new-migration"', command: `supabase migration new new-migration`, jsx: () => { return ( <> supabase migration new new-migration > ) }, }, { comment: 'Run all migrations against this project', command: `supabase db push`, jsx: () => { return ( <> supabase db push > ) }, }, ] return (
Database changes are managed through "migrations" and they are a common way of tracking changes to your database over time. You can run migrations against your project's database via the Supabase CLI.