Altan
HomeDiscordStatus
HomeDiscordStatus
  1. Databases
  • What is Altan?
  • Support Options
  • Projects
    • Create Your First Project
    • App Navigation & Settings
    • Building Tips
    • The Art of Prompting
    • Publishing Your App
    • Rollback and Checkpoints
    • Instantly Resolve Errors
    • How to export projects from Altan - Github
    • How to import projects into Altan
    • Work collaboratively
    • Removing Altan's watermark
  • Databases
    • Introduction
    • Import from Supabase
    • Security
    • Technical Overview
    • Database Tools for Agents
  • AI Agents
    • What is an AI Agent?
    • Create your first AI Agent
    • Tools
    • Interacting with Your AI Agent
    • Technical Overview
    • Altan Frontend SDK
      • Altan Frontend SDK
  • Flows
    • Create your first Flow
    • Automation basics
    • Adding modules
    • Types of modules
    • Passing data
    • Filters
    • Debugging
    • Retrigger events
    • Version History
    • Overwrite connection
    • Task credits
  • Integration
    • Magic Link
    • Altan Integrator
    • Create your integration
  • Authentication
    • Authentication
  • Payments
    • Checkout Session
    • Object Storage
  • Media
    • Media
  • Partner Program
    • Who are our Partners?
    • Partner Program Benefits
    • How to start on Altan
    • Become an Altan Partner
  • API Reference
    • account
      • Create Account
      • Get Account Gq
      • Get Account Public
      • Get Account Usage
      • Patch Account
      • Delete Account
      • Get Account Users
      • Create Custom Webhook
      • Create Media
      • Create Media From Url
      • Create Multiple Media
      • Create Token
      • Create Agent
      • Upsert Flow
      • Fetch User Account Notifications
      • Create Altaner
      • Get Selected Template Version
      • Get Latest Template Version
      • Get Template Version
      • Invite User
      • Create Interface
      • Get Members
      • Get Account Connections
      • Get Apikey
      • Delete Apikey
    • project
      • Get Altaner
      • Create Project V2
      • Update Altaner
      • Delete Altaner
      • Get Altaner Flows
      • Clone Altaner
      • Update Altaner Positions
      • Create Altaner Component
      • Update Altaner Component
      • Get Altaner Component
      • Atomic Update Altaner Component
      • Delete Altaner Component
      • Duplicate Altaner
      • Create Idea
    • interface
      • Start Dev Server
      • Get Dev Status
      • Send Dev Error To Agent
      • Revise Interface
      • Get Dev Errors
      • Log Error
      • Create Or Overwrite File
      • Update File
      • Create Multiple Files
      • Read File
      • Read Multiple Files
      • Delete File
      • Rename File
      • Update Files Pattern
      • Search In Files
      • Search And Replace
      • Preview Updates
      • Install Libraries
      • List Tree
      • List Tree Json
      • Get Repo Status
      • List Branches
      • Create Branch
      • Delete Branch
      • Switch Branch
      • Clone Repo
      • Merge Branch
      • Commit Changes
      • Get Diff Changes
      • Accept Changes
      • Discard Changes
      • Push Changes
      • Pull Changes
      • Reset Repo
      • Get Repo Log
      • Restore Main
      • Get Public Interface
      • Get Interface By Name
      • Get Interface
      • Update Interface
      • Delete Interface
      • Get Interface Screenshot
      • Update Interface With Ai
      • Publish Interface
      • Vercel Webhook
      • Get Deployment Status
      • Add Collaborator
      • Get Deployment Logs
      • Fix Deployment With Ai
      • Add Domain
      • Get Domains
      • Remove Domain
      • Verify Domain
      • Add Env Variables
      • Get Env Variables
      • Delete Env Variable
      • Sync Env Variables
      • Rollback Deployment
      • Get Commit Details
      • Restore To Commit
    • flows
      • modules
        • Fetch Module
        • Update Flow Module
        • Delete Module
        • Fetch Graph Module
        • Rename Module
        • Update Position In Canvas
        • Update In Edge Filter
        • Update Route Condition Filter
        • Add Condition
        • Get Available Variables For Mappings
      • hooks
        • Get Webhook
        • Update Hook
      • executions
        • Get File Signed Url
        • Stream Execution
      • Fetch Flow Execution
      • Fetch Flow
      • Update Flow
      • Delete Flow
      • Get Latest Execution
      • Fetch Flow Schema
      • Get Flow From Hook
      • Get Flow Hook
      • Fetch Flow Executions
      • Fetch Flow Executions
      • Upsert Flow Module
      • Add Flow Module
      • Create Flow Duplicate
      • Clone Flow Modules
      • Paste Flow Modules
      • Delete Modules
      • Update Edge
    • media
      • Get Media Url
      • Delete Media
      • Get Multiple Media
      • Get 3D Media
      • Delete Model
      • Create 3D Model
    • agents
      • tools
        • Patch Tool
        • Patch Tool
      • authorizaiton requests
        • Create Authorization Request
        • List Authorization Requests
        • Get Authorization Request
        • Delete Authorization Request
        • Reject Authorization Request
      • Get Altan Agents
      • List Voices
      • Get Agent
      • Update Agent
      • Delete Agent
      • Get Agent
      • Create And Add Tool To Agent
      • Remove Tool And Space
      • Get User Agent Dm Room
      • Get Agent Gate
      • Get Agent Member Usage
  1. Databases

Import from Supabase

This tutorial explains how to migrate your schema and data from Supabase to Altan Databases.

Overview#

Migration has two phases:
1.
Schema Migration — replicate your Supabase tables, columns, indexes, and foreign keys inside Altan.
2.
Data Migration — export your rows from Supabase as CSV files and import them into Altan.
Here's a quick tutorial video that walks you through the process:
Lovable to altan.png

Step 1: Export Your Supabase Schema#

Open the SQL Editor in Supabase and run the following query:
This query returns a JSON description of your schema including:
Columns, types, nullability, defaults
Primary keys
Foreign keys
Indexes
RLS policies
Click 'Copy cell content' to copy the JSON output in the clipboard.

Step 2: Import Schema into Altan#

Copy the JSON output, then open the Altan project where you want to import the corresponding database schema and enter:
Import this database schema:
[PASTE JSON HERE]
This will recreate your tables with the same structure.
altan-import.png

Step 3: Export Data from Supabase#

For each table:
1.
Go to Table Editor.
2.
Select the table
3.
Use the ··· menu → Export data → Export table as CSV.
4.
Repeat for all tables in the database.

Step 4: Import Data into Altan#

1.
Open the corresponding table in Altan project.
2.
Click Import CSV.
3.
Upload the CSV file you exported from Supabase.
4.
Repeat for all tables in the correct order.
⚠️ Import order is critical:
When working with relational data, some tables depend on others through foreign key relationships. This means that one table (the child) references rows in another table (the parent).
Parent tables contain the primary data that other tables point to.
Child tables contain references (foreign keys) to the parent tables.
For example, imagine you have two tables:
A customers table that stores each customer’s details (id, name, email, etc.).
An orders table that stores purchases. Each order includes a customer_id field that points back to a row in the customers table (i.e. the correspondingid value from the customers table).
Because every order must reference an existing customer, you need to import the CSV for customers first. Once all customers are in place, you can safely import orders.csv, since the foreign key (customer_id → customers.id) will resolve correctly.
If you reverse the order, the import will fail because Altan will try to insert orders that point to customers who don’t yet exist.
TLDR: import parent tables first and then child tables.
Modified at 2025-09-10 17:58:38
Previous
Introduction
Next
Security
Built with