Open viveKing21 opened 6 months ago
db.executeSql('PRAGMA foreign_keys = ON');
Execute this after creating connection and it will solve your issue .. it worked for me.
Originally posted by @AdnanAshraf-pro in https://github.com/andpor/react-native-sqlite-storage/issues/478#issuecomment-934100851
‘PRAGMA foreign_keys=ON;’ executed and success callback invokes, but after that if I check ‘PRAGMA foreign_keys;’ it gives result ‘{foreign_keys:0}’ and its not working, accepting any integer as FK and CASCADE not working on Delete.
android devices
Execute this after creating connection and it will solve your issue .. it worked for me.
Originally posted by @AdnanAshraf-pro in https://github.com/andpor/react-native-sqlite-storage/issues/478#issuecomment-934100851
‘PRAGMA foreign_keys=ON;’ executed and success callback invokes, but after that if I check ‘PRAGMA foreign_keys;’ it gives result ‘{foreign_keys:0}’ and its not working, accepting any integer as FK and CASCADE not working on Delete.
android devices