Migrations in transaction and self management
Running a function during migration
SELECT
e.g. :
SELECT create_hypertable('conditions', 'time', 'location', 4);
Since this is part of the table creation, I would like to make sure it happens during migration step. Is there a way to run raw sql as part of a migration?...Updating JSON object value in column
Kysely Geometry Parsing Plugin - Convert driver values to/from geojson
Ad-Hoc select from table not in Kysely types
kysely-codgen
cli, and want to know how one can ad-hoc use the selectFrom
statement from a table not included in the generated types by typing it ourselves as we build the query?Convert JSON array result into JS array
Destroying connection necessary?
how to insert an array of strings
Typescript Error when creating MySQL db pool
Migrate beyond 9 (to `10-...`)
10-passport
but I am always getting this error:
Error: corrupted migrations: expected previously executed migration 2-userguilds to be at index 2 but 10 was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.
Error: corrupted migrations: expected previously executed migration 2-userguilds to be at index 2 but 10 was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.
Transaction response time
createUser(), createProfile(), createBusiness(), and createAddress()
for this example.
Currently, I have creaeUser()
execute on it's own and then the other 3 free functions execute as one transaction. Which gives me the benefit of having a fast response time for when a user creates an account. (the loading screen is quick) but I don't know if that benefit outweighs the risk of having user records in the database without a profile, business, and/or address
records - *if for some reason the transaction fails but the createUser()
executed fine.
...How to handle failed transactions
How to generate query synchronously?
How to write "SELECT 1 FROM tablename"
Join using a json value with postgres
How to use coalesce in a join
Plugin for auto-update "updated_at" field
Making Transactions with KyselyAdapter for auth.js
Wrong return type in raw sql
``typescript
select([
sql
COUNT(DISTINCT r.review_id).as("reviewCount"),
sql
COUNT(DISTINCT i.interaction_id)`.as("interactionCount"),...Using `.orderBy` in JSON