Md Jahidul Islam milon
Md Jahidul Islam milon
DTDrizzle Team
Created by Md Jahidul Islam milon on 4/26/2024 in #help
onUpdate
updatedAt: timestamp('updated_at', { mode: 'date', precision: 3 }) .defaultNow() .$onUpdate(() => sql(now() AT TIME ZONE 'UTC')) .notNull(), can we return sql from $onUpdate? $onUpdate(() => sql(now() AT TIME ZONE 'UTC')) this?
2 replies
DTDrizzle Team
Created by Md Jahidul Islam milon on 4/22/2024 in #help
wrap migrations in transaction
does drizzle wrap migrations in transaction?
3 replies
DTDrizzle Team
Created by Md Jahidul Islam milon on 12/4/2023 in #help
On Failed Migration rollback doesn't happend on the database
If any migration file have multiple line of statement, and if 3rd line cause any error to failed the migration then changes made by 1st and 2nd line on the database did not rollback. so next time when i try to fix the issue of 3rd line and rerun the migration got error on 1st and 2nd line that those are already applied. reproduce code & more details: https://github.com/milon27/dirzzle-kit-error#error-statement
3 replies
DTDrizzle Team
Created by Md Jahidul Islam milon on 7/9/2023 in #help
how to use insert with select in drizzle?
INSERT INTO your_table (column1, column2, column3, category_id)
SELECT column1, column2, column3, new_category_id
FROM your_table
WHERE category_id = old_category_id;
INSERT INTO your_table (column1, column2, column3, category_id)
SELECT column1, column2, column3, new_category_id
FROM your_table
WHERE category_id = old_category_id;
how to convert it into drizzle?
13 replies
DTDrizzle Team
Created by Md Jahidul Islam milon on 7/6/2023 in #help
union or union all in drizzle orm?
SELECT 'meal' as "type" ,count(*) from meal where user_id=''
UNION ALL
SELECT 'deposit' as "type" ,count(*) from deposit where user_id=''
SELECT 'meal' as "type" ,count(*) from meal where user_id=''
UNION ALL
SELECT 'deposit' as "type" ,count(*) from deposit where user_id=''
how to do this in drizzle?
2 replies
DTDrizzle Team
Created by Md Jahidul Islam milon on 6/18/2023 in #help
Drizzle in vscode Ts Server is very slow
5 replies