comdb2 icon indicating copy to clipboard operation
comdb2 copied to clipboard

Add support for sequences on existing column

Open chands10 opened this issue 1 year ago • 1 comments

null=yes should not be needed in this case (see first commit) Adds csc2 and ddl support

Provided that:

  • The col the sequence is added on is the leftmost field in some key
    • The key can be added in the same schema change as adding nextsequence
    • Or, an existing valid key can even be removed in the same schema change as adding nextsequence
  • It is not a partial key
  • Nullsort low is enabled
  • The key is ascending
  • If the key is empty or the highest value in the key is NULL, start sequence from 0

Also note: in strict mode you can convert a column from int b to longlong b dbstore=nextsequence and this is fine even though the old column is only an int

chands10 avatar Jun 21 '24 21:06 chands10

cdb2test Jun 25 15:22:45 2024 in-comdb2db existing_auto_inc.R20240625.4

chands10 avatar Jun 25 '24 20:06 chands10

THANK YOU MARK!!

chands10 avatar Aug 06 '24 18:08 chands10