pkgng

Check-in [757e60dc31]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge pull request #596 from so14k/fix-sql-trigger - Fix typo in trigger introduced in
Timelines: family | ancestors | descendants | both | trunk | multi-repos | stash
Files: files | file ages | folders
SHA1:757e60dc314e6c9376bc0dba2b869165ca7f4186
User & Date: m.seaman@infracaninophile.co.uk 2013-09-23 05:27:21
Context
2013-09-24
21:44
Disable support for autoplist in staging as it breaks meta ports check-in: ce7d16d36f user: bryan@shatow.net tags: trunk, multi-repos, stash
2013-09-23
05:27
Merge pull request #596 from so14k/fix-sql-trigger - Fix typo in trigger introduced in check-in: 757e60dc31 user: m.seaman@infracaninophile.co.uk tags: trunk, multi-repos, stash
05:19
- Fix typo in trigger introduced in b5a535e93d7e28d15eb90ec7655417863e043682 check-in: 73ad1265ea user: brd@FreeBSD.org tags: trunk, multi-repos, stash
2013-09-22
09:36
Fix typo. check-in: c906240ee1 user: m.seaman@infracaninophile.co.uk tags: trunk, multi-repos, stash
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to libpkg/private/db_upgrades.h.

435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
                        " type = new.type,"
	                " script_id = ( SELECT script_id"
	                " FROM script WHERE script = new.script )"
                " WHERE package_id = old.package_id"
                        " AND type = old.type;"
        "END;"
        "CREATE TRIGGER scripts_insert"
                " INSTEAD OR INSERT ON scripts "
        "FOR EACH ROW BEGIN"
                " INSERT OR IGNORE INTO script(script)"
                " VALUES(new.script);"
	        " INSERT INTO pkg_script(package_id, type, script_id) "
	        " SELECT new.package_id, new.type, s.script_id"
                " FROM script s WHERE new.script = s.script;"
	"END;"







|







435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
                        " type = new.type,"
	                " script_id = ( SELECT script_id"
	                " FROM script WHERE script = new.script )"
                " WHERE package_id = old.package_id"
                        " AND type = old.type;"
        "END;"
        "CREATE TRIGGER scripts_insert"
                " INSTEAD OF INSERT ON scripts "
        "FOR EACH ROW BEGIN"
                " INSERT OR IGNORE INTO script(script)"
                " VALUES(new.script);"
	        " INSERT INTO pkg_script(package_id, type, script_id) "
	        " SELECT new.package_id, new.type, s.script_id"
                " FROM script s WHERE new.script = s.script;"
	"END;"