To remove all entries from the offer table in PostgreSQL, you can use either of the following SQL commands depending on whether you want to:


๐Ÿงจ 1. Completely remove all rows (fast, resets auto-increment counters):


TRUNCATE TABLE offer RESTART IDENTITY CASCADE;


๐Ÿ”„ 2. Delete all rows (preserves sequence counters):


DELETE FROM offer;


โœ… Recommendation:

Use TRUNCATE TABLE offer RESTART IDENTITY CASCADE; for development or when you're sure you want a clean slate.

Let me know if you want to restrict this by condition or run it inside a Flyway migration.