© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
4 replies
hugo

[SOLVED] How to add new column?

Hello!
Any ideas how to add a new column to an existing table?
What I did so far:
1. Updated the schema to add a new column:
website: text('website')
website: text('website')

2. Generated migration files, and it did create the correct SQL statement, but for some reason I don't understand, it is not applicable:
/*
 SQLite does not support "Set default to column" out of the box, we do not generate automatic migration for that, so it has to be done manually
 Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php
                  https://www.sqlite.org/lang_altertable.html
                  https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3

 Due to that we don't generate migration automatically and it has to be done manually
*/--> statement-breakpoint
ALTER TABLE sfdc_opportunities ADD `website` text;
/*
 SQLite does not support "Set default to column" out of the box, we do not generate automatic migration for that, so it has to be done manually
 Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php
                  https://www.sqlite.org/lang_altertable.html
                  https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3

 Due to that we don't generate migration automatically and it has to be done manually
*/--> statement-breakpoint
ALTER TABLE sfdc_opportunities ADD `website` text;

3. Running the migration fails with:
RangeError: The supplied SQL string contains no statements
    at Database.prepare
RangeError: The supplied SQL string contains no statements
    at Database.prepare

I'm using
'@libsql/client'
'@libsql/client'
connected to Turso.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to add a new column to an existing table
Drizzle TeamDTDrizzle Team / help
2y ago
[Solved] Aliasing a column
Drizzle TeamDTDrizzle Team / help
16mo ago
[solved] Parameterized Column Selection
Drizzle TeamDTDrizzle Team / help
3y ago
how to add new driver to drizzle?
Drizzle TeamDTDrizzle Team / help
3y ago