from sqlobject import *

hub = sqlhub

class Piece(SQLObject):

    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    price = CurrencyCol()
    inventory = IntCol(notNull=True, default=0)
    active = BoolCol(notNull=True, default=True)

class PieceTags(SQLObject):

    piece = ForeignKey('Piece', cascade=True)
    tag = StringCol(notNull=True)

class Section(SQLObject):

    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    tag = StringCol()

def init_db(reset=False):
    for table in Piece, PieceTags, Section:
        table.createTable(ifNotExists=True)
        if reset:
            table.clearTable()
    

bf85aa7b0e007a0208595ad3c14df05736d2dd9e
<mask token>


class PieceTags(SQLObject):
    <mask token>
    <mask token>


class Section(SQLObject):
    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    tag = StringCol()


<mask token>

<mask token>


class PieceTags(SQLObject):
    piece = ForeignKey('Piece', cascade=True)
    tag = StringCol(notNull=True)


class Section(SQLObject):
    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    tag = StringCol()


<mask token>

<mask token>


class Piece(SQLObject):
    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    price = CurrencyCol()
    inventory = IntCol(notNull=True, default=0)
    active = BoolCol(notNull=True, default=True)


class PieceTags(SQLObject):
    piece = ForeignKey('Piece', cascade=True)
    tag = StringCol(notNull=True)


class Section(SQLObject):
    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    tag = StringCol()


def init_db(reset=False):
    for table in (Piece, PieceTags, Section):
        table.createTable(ifNotExists=True)
        if reset:
            table.clearTable()

from sqlobject import *
hub = sqlhub


class Piece(SQLObject):
    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    price = CurrencyCol()
    inventory = IntCol(notNull=True, default=0)
    active = BoolCol(notNull=True, default=True)


class PieceTags(SQLObject):
    piece = ForeignKey('Piece', cascade=True)
    tag = StringCol(notNull=True)


class Section(SQLObject):
    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    tag = StringCol()


def init_db(reset=False):
    for table in (Piece, PieceTags, Section):
        table.createTable(ifNotExists=True)
        if reset:
            table.clearTable()

from sqlobject import *

hub = sqlhub

class Piece(SQLObject):

    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    price = CurrencyCol()
    inventory = IntCol(notNull=True, default=0)
    active = BoolCol(notNull=True, default=True)

class PieceTags(SQLObject):

    piece = ForeignKey('Piece', cascade=True)
    tag = StringCol(notNull=True)

class Section(SQLObject):

    title = StringCol(notNull=True)
    link = StringCol(alternateID=True)
    description = StringCol()
    tag = StringCol()

def init_db(reset=False):
    for table in Piece, PieceTags, Section:
        table.createTable(ifNotExists=True)
        if reset:
            table.clearTable()
    
