1

I have created my sqlobject class like so and set the primary key to prm_id

import sqlobject
from connection import conn
class tbl_episodes(sqlobject.SQLObject):
        class sqlmeta:
              idName = "prm_id"
        _connection = conn
        prm_id = sqlobject.IntCol(length=30)
        showid = sqlobject.IntCol(length=30, default=None)
        show_index = sqlobject.IntCol(length=30)
        videoid = sqlobject.IntCol(length=30)

However i have removed the primary key and decided to make showid and show_index as the composite primary key

how should i adjust my class to reflect the database change ?

Aatish Molasi
  • 2,138
  • 3
  • 20
  • 43

1 Answers1

0

SQLObject doesn't support composite primary keys. SQLObject requires that every table has a primary key and the key must be a single column.

Generic SQL theory recommends having simple unique autoincremented int as the primary key.

phd
  • 82,685
  • 13
  • 120
  • 165