Friday, April 23, 2021

Oracle database sequences generated by Django

Hello everyone.

I have a web application built in Django == 1.11.6, when the migrations were generated in oracle the sequences are created and they can be modified and even deleted. 

When I update to django 3 and I generate the migrations again, it creates the sequences with a name similar to this (ISEQ $$ _ 76200) but it does not allow me to edit them and or delete them, it shows me the following message (ORA-32794: cannot delete a sequence generated by the system). The downside is that I have a stored procedure that drops a stream and recreates it to load with data from other tables each time it is run. 
(BEGIN / * DELETE RPT DATA ------------------------------------------- --- * / / * INITIALIZE THE SEQUENCE --------------------------------------------- - * / DELETE FROM SISREPORTS_RPT02; EXECUTE IMMEDIATE 'DROP SEQUENCE SISREPORTS_RPT02_SQ'; EXECUTE IMMEDIATE 'CREATE SEQUENCE SISREPORTS_RPT02_SQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 CACHE 20 '; /*FINISH ----------------------------------------------- -------------------- * /) 

 My question is that if the new versions of django can do some configuration before generating them migrations and can have the option to modify the oracle sequences.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0ac33519-682f-4c13-83d0-07810599f2aen%40googlegroups.com.

No comments:

Post a Comment