Menu Close
    Start a Project Request quote Reading list Switch to dark mode
    odoo-hyperlocal-marketplace-guide

    How to fix missing sequence in PostgreSQL

    Sequences objects are commonly used to generate unique numbers for tables.

    In this blog i will demonstrate how to fix missing sequence in PostgreSQL. Actually when we upgrade our table from older to new version then sometimes we face missing sequence issue. Below steps will help you to fix sequence missing issue.

    For example test_webkul_id_seq sequence table is missing from your table(“test_webkul“). You can also check your sequence table from your table,


    id  | integer   | not null default nextval(‘test_webkul_id_seq’::regclass) | plain    |              |

    In order to fix missing sequence issue create sequence table by running in below command in your postgres terminal,


    Then set your table’s next sequence by running below command. This step is necessary only if some data is already present in your table. In case you forgot to run below command then sequence of table will start from 1.


    In above command,

    • “test_webkul_id_seq” is regclass.
    • “2500” is next sequence of table.
    • true is_called flag.

    Hopefully that blog will be helpful for you to fix issue!!

     

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close