home.social

#foreignkey — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #foreignkey, aggregated by home.social.

  1. One DELETE Cascades To 3.5 MILLION Rows?!

    PRODUCTION APOCALYPSE! Deleted ONE user and CASCADE deleted 3.5 MILLION rows across 4 tables! Orders, payments, everything GONE! This is the scariest SQL behavior! Watch this nightmare!

    #sql #sqldisaster #cascadedelete #foreignkey #productionbug #dataloss #sqlfails #massdeletion #sqlshorts #databasedisaster #sqlwtf #cascadenightmare

    youtube.com/watch?v=pE_OMbOia_w

  2. One DELETE Cascades To 3.5 MILLION Rows?!

    PRODUCTION APOCALYPSE! Deleted ONE user and CASCADE deleted 3.5 MILLION rows across 4 tables! Orders, payments, everything GONE! This is the scariest SQL behavior! Watch this nightmare!

    #sql #sqldisaster #cascadedelete #foreignkey #productionbug #dataloss #sqlfails #massdeletion #sqlshorts #databasedisaster #sqlwtf #cascadenightmare

    youtube.com/watch?v=pE_OMbOia_w

  3. One DELETE Cascades To 3.5 MILLION Rows?!

    PRODUCTION APOCALYPSE! Deleted ONE user and CASCADE deleted 3.5 MILLION rows across 4 tables! Orders, payments, everything GONE! This is the scariest SQL behavior! Watch this nightmare!

    #sql #sqldisaster #cascadedelete #foreignkey #productionbug #dataloss #sqlfails #massdeletion #sqlshorts #databasedisaster #sqlwtf #cascadenightmare

    youtube.com/watch?v=pE_OMbOia_w

  4. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  5. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  6. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  7. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  8. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  9. Spent hours today looking for the following: I have a app with . I use for a big part of functionality.
    I need to pass a custom query for a select field that is a between Table A and table B. I try to accomplish that while being in the list view (the table view) for all entries in Table A, where each record has a foreignkey from Table B to only show those records in the select field for the foreignkey that are B.active==true.Is there a way to do this?

  10. Spent hours today looking for the following: I have a #Flask app with #sqlalchemy. I use #flaskadmin for a big part of functionality.
    I need to pass a custom query for a select field that is a #foreignkey between Table A and table B. I try to accomplish that while being in the list view (the table view) for all entries in Table A, where each record has a foreignkey from Table B to only show those records in the select field for the foreignkey that are B.active==true.Is there a way to do this?

  11. Django 5.0 has been released 🎉

    After months of work, everyone can use this great new version 🙌

    My favorite features are:
    • 🤖 generated fields
    • ✅ database default values
    • 🔑 prefetch related for generic foreign keys

    Which are your favorite features?
    djangoproject.com/weblog/2023/

  12. Django 5.0 has been released 🎉

    After months of work, everyone can use this great new version 🙌

    My favorite features are:
    • 🤖 generated fields
    • ✅ database default values
    • 🔑 prefetch related for generic foreign keys

    Which are your favorite features?
    djangoproject.com/weblog/2023/

    #Django #GeneratedField #GeneratedColumn #Database #ORM #SQLite #PostgreSQL #MySQL #MariaDB #Default #ForeignKey #Django5 #Python #Python312 #Web #Framework #Release #ORM

  13. Django 5.0 has been released 🎉

    After months of work, everyone can use this great new version 🙌

    My favorite features are:
    • 🤖 generated fields
    • ✅ database default values
    • 🔑 prefetch related for generic foreign keys

    Which are your favorite features?
    djangoproject.com/weblog/2023/

    #Django #GeneratedField #GeneratedColumn #Database #ORM #SQLite #PostgreSQL #MySQL #MariaDB #Default #ForeignKey #Django5 #Python #Python312 #Web #Framework #Release #ORM

  14. Django 5.0 has been released 🎉

    After months of work, everyone can use this great new version 🙌

    My favorite features are:
    • 🤖 generated fields
    • ✅ database default values
    • 🔑 prefetch related for generic foreign keys

    Which are your favorite features?
    djangoproject.com/weblog/2023/

    #Django #GeneratedField #GeneratedColumn #Database #ORM #SQLite #PostgreSQL #MySQL #MariaDB #Default #ForeignKey #Django5 #Python #Python312 #Web #Framework #Release #ORM

  15. Django 5.0 has been released 🎉

    After months of work, everyone can use this great new version 🙌

    My favorite features are:
    • 🤖 generated fields
    • ✅ database default values
    • 🔑 prefetch related for generic foreign keys

    Which are your favorite features?
    djangoproject.com/weblog/2023/

    #Django #GeneratedField #GeneratedColumn #Database #ORM #SQLite #PostgreSQL #MySQL #MariaDB #Default #ForeignKey #Django5 #Python #Python312 #Web #Framework #Release #ORM