Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLlite support #13

Open
loprima-l opened this issue Jun 1, 2024 · 1 comment
Open

SQLlite support #13

loprima-l opened this issue Jun 1, 2024 · 1 comment

Comments

@loprima-l
Copy link

Do you know if there's a way to export the schema from an SQLlite database ?
Thank you :3

@makaroni4
Copy link
Contributor

Hey @loprima-l 👋

I believe there is, yes!

You can see all SQLite tables using sqlite_schema table:

SELECT * FROM sqlite_schema;

Screenshot 2024-06-28 at 13 04 45

You can either scrape the output or at least get all table names and then inspect each table separately using the PRAGMA function:

PRAGMA table_info(users)

Screenshot 2024-06-28 at 13 05 03

@loprima-l are you up for a challenge to write an adapter? 😊

You'd need to write a script that generates a custom schema CSV file similar to this one: https://github.com/sqlhabit/sql_schema_visualizer/blob/main/schema.csv.template (need to have these columns: "table_schema","table_name","column_name","data_type","ordinal_position")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants