Add persistent Oracle database setup with multiple tables#2
Open
devin-ai-integration[bot] wants to merge 2 commits intodevelopfrom
Open
Add persistent Oracle database setup with multiple tables#2devin-ai-integration[bot] wants to merge 2 commits intodevelopfrom
devin-ai-integration[bot] wants to merge 2 commits intodevelopfrom
Conversation
- Add Docker Compose configuration for persistent Oracle database with volume - Create simple tables (categories, status_lookup) with basic constraints - Create medium complexity tables (customers, products, orders) with foreign keys and indexes - Create complex tables (order_items, audit_log, inventory_transactions) with triggers - Add triggers for order totals, inventory tracking, and audit logging - Add setup scripts for database initialization and installation - Add verification script to test data persistence across restarts - Add comprehensive documentation for the persistent database setup Co-Authored-By: sachet.agarwal@windsurf.com <sachet.agarwal@windsurf.com>
Author
Original prompt from sachet.agarwal |
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Add SET DEFINE OFF to prevent & character substitution prompts - Use compound trigger for trg_update_order_total to avoid mutating table error (ORA-04091) - Remove redundant indexes on columns already indexed by UNIQUE constraints Co-Authored-By: sachet.agarwal@windsurf.com <sachet.agarwal@windsurf.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds local development support for running the utPLSQL demo project with a persistent Oracle database instead of ephemeral CI/CD containers. The setup includes Docker Compose configuration with volume-based persistence and creates multiple tables demonstrating varying levels of database complexity.
Key additions:
oracle-data) mounted to/opt/oracle/oradatadocs/PERSISTENT_DATABASE_SETUP.mdThe complex tables include 5 triggers that handle automatic order total calculation, inventory tracking, customer audit logging, and timestamp updates.
Updates since last revision
Fixed SQL compatibility issues discovered during local testing:
SET DEFINE OFFto all SQL scripts to prevent&character in "Home & Garden" from being interpreted as a substitution variable prompttrg_update_order_totalfrom a row-level trigger to a compound trigger to avoid ORA-04091 mutating table error when querying order_items during INSERT/UPDATE/DELETELocal testing confirmed: tables install successfully, triggers fire correctly, order totals are calculated, inventory transactions are logged, and data persists across container restarts.
Review & Testing Checklist for Human
trg_update_order_totalcompound trigger collects order IDs during row processing and updates totals in AFTER STATEMENT. Test with bulk inserts (e.g.,INSERT INTO order_items SELECT ...) to verify totals calculate correctly for multiple rows in one statement../scripts/verify_persistence.shor manually stop/start the container to confirm data survives restartstrg_update_inventoryis still a row-level trigger. Verify it handles product quantity updates correctly when multiple order items reference the same product in one transaction.Recommended test plan:
./scripts/setup_persistent_db.shand wait for database ready./scripts/install_all.shsqlplus ut3_demo/ut3_demo@//127.0.0.1:1521/XEand verify tables existSELECT order_id, total_amount FROM orders;to verify order totals were calculated by triggers./scripts/verify_persistence.shto test persistenceNotes
oraclefor SYS,ut3_demo/ut3_demofor demo user) as this is a demo/development setupLink to Devin run: https://app.devin.ai/sessions/2510995b0b71448a8c395ef96d7c4fc5
Requested by: @SachetCognition