本文整理匯總了Python中bodhi.model.Release.dropTable方法的典型用法代碼示例。如果您正苦於以下問題:Python Release.dropTable方法的具體用法?Python Release.dropTable怎麽用?Python Release.dropTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bodhi.model.Release
的用法示例。
在下文中一共展示了Release.dropTable方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: clean_tables
# 需要導入模塊: from bodhi.model import Release [as 別名]
# 或者: from bodhi.model.Release import dropTable [as 別名]
def clean_tables():
from bodhi.model import Release, Package
print "Cleaning out tables"
Release.dropTable(ifExists=True, cascade=True)
Package.dropTable(ifExists=True, cascade=True)
hub.commit()
Release.createTable(ifNotExists=True)
Package.createTable(ifNotExists=True)
示例2: clean_tables
# 需要導入模塊: from bodhi.model import Release [as 別名]
# 或者: from bodhi.model.Release import dropTable [as 別名]
def clean_tables():
from bodhi.model import (Release, Package, PackageBuild, PackageUpdate,
Comment, CVE, Bugzilla, BuildRootOverride)
from bodhi.identity.tables import (Visit, VisitIdentity, Group, User,
Permission)
print "Cleaning out tables"
Release.dropTable(ifExists=True, cascade=True)
Package.dropTable(ifExists=True, cascade=True)
PackageBuild.dropTable(ifExists=True, cascade=True)
PackageUpdate.dropTable(ifExists=True, cascade=True)
Comment.dropTable(ifExists=True, cascade=True)
CVE.dropTable(ifExists=True, cascade=True)
Bugzilla.dropTable(ifExists=True, cascade=True)
BuildRootOverride.dropTable(ifExists=True, cascade=True)
Visit.dropTable(ifExists=True, cascade=True)
VisitIdentity.dropTable(ifExists=True, cascade=True)
Group.dropTable(ifExists=True, cascade=True)
User.dropTable(ifExists=True, cascade=True)
Permission.dropTable(ifExists=True, cascade=True)
hub.commit()
Release.createTable(ifNotExists=True)
Package.createTable(ifNotExists=True)
PackageBuild.createTable(ifNotExists=True)
PackageUpdate.createTable(ifNotExists=True)
Comment.createTable(ifNotExists=True)
CVE.createTable(ifNotExists=True)
Bugzilla.createTable(ifNotExists=True)
BuildRootOverride.createTable(ifNotExists=True)
Visit.createTable(ifNotExists=True)
VisitIdentity.createTable(ifNotExists=True)
Group.createTable(ifNotExists=True)
User.createTable(ifNotExists=True)
Permission.createTable(ifNotExists=True)