本文整理汇总了PHP中DBUtil::drop_table方法的典型用法代码示例。如果您正苦于以下问题:PHP DBUtil::drop_table方法的具体用法?PHP DBUtil::drop_table怎么用?PHP DBUtil::drop_table使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBUtil
的用法示例。
在下文中一共展示了DBUtil::drop_table方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: down
public function down()
{
$tables = array('bans', 'user_metadata', 'user_security', 'user_groups', 'users', 'group_permissions', 'groups_users');
foreach ($tables as $table) {
\DBUtil::drop_table($table);
}
}
示例2: down
public function down()
{
\DBUtil::drop_table('scripts_forms_products');
\DBUtil::drop_table('scripts_forms_questions_products');
\DBUtil::drop_table('scripts_forms_responses_products');
\DB::query("ALTER TABLE `scripts_forms` DROP `rebuttal_script`")->execute();
}
示例3: down
function down()
{
// get the configured table name
$table = \Config::get('simpleauth.table_name', 'users');
// drop the users table
\DBUtil::drop_table($table);
}
示例4: down
function down()
{
// get the driver used
\Config::load('auth', true);
$drivers = \Config::get('auth.driver', array());
is_array($drivers) or $drivers = array($drivers);
if (in_array('Simpleauth', $drivers)) {
// get the tablename
\Config::load('simpleauth', true);
$table = \Config::get('simpleauth.table_name', 'users') . '_providers';
// make sure the configured DB is used
\DBUtil::set_connection(\Config::get('simpleauth.db_connection', null));
} elseif (in_array('Ormauth', $drivers)) {
// get the tablename
\Config::load('ormauth', true);
$table = \Config::get('ormauth.table_name', 'users') . '_providers';
// make sure the configured DB is used
\DBUtil::set_connection(\Config::get('ormauth.db_connection', null));
}
if (isset($table)) {
// drop the users remote table
\DBUtil::drop_table($table);
}
// reset any DBUtil connection set
\DBUtil::set_connection(null);
}
示例5: down
function down()
{
// get the drivers defined
$drivers = normalize_driver_types();
if (in_array('Simpleauth', $drivers)) {
// get the tablename
\Config::load('simpleauth', true);
$basetable = \Config::get('simpleauth.table_name', 'users');
// make sure the configured DB is used
\DBUtil::set_connection(\Config::get('simpleauth.db_connection', null));
} elseif (in_array('Ormauth', $drivers)) {
// get the tablename
\Config::load('ormauth', true);
$basetable = \Config::get('ormauth.table_name', 'users');
// make sure the configured DB is used
\DBUtil::set_connection(\Config::get('ormauth.db_connection', null));
} else {
$basetable = 'users';
}
\DBUtil::drop_table($basetable . '_sessionscopes');
\DBUtil::drop_table($basetable . '_sessions');
\DBUtil::drop_table($basetable . '_scopes');
\DBUtil::drop_table($basetable . '_clients');
// reset any DBUtil connection set
\DBUtil::set_connection(null);
}
示例6: down
public function down()
{
\DBUtil::drop_table('scripts_forms');
\DBUtil::drop_table('scripts_forms_questions');
\DBUtil::drop_table('type_scripts_forms_fields');
\DBUtil::drop_table('scripts_forms_answers');
\DBUtil::drop_table('scripts_forms_answers');
}
示例7: down
/**
* Drop tables: users, options, posts, tags, posts_tags
*/
public function down()
{
\DBUtil::drop_table('users');
\DBUtil::drop_table('options');
\DBUtil::drop_table('posts');
\DBUtil::drop_table('tags');
\DBUtil::drop_table('posts_tags');
}
示例8: down
function down()
{
\DBUtil::drop_table('accounts');
\DBUtil::drop_table('accounts_metadata');
\DBUtil::drop_table('apis');
\DBUtil::drop_table('apis_metadata');
\DBUtil::drop_table('api_stats');
\DBUtil::drop_table('data_calls');
}
示例9: down
public function down()
{
\Config::load('sentry', true);
\DBUtil::drop_table(\Config::get('sentry.table.users'));
\DBUtil::drop_table(\Config::get('sentry.table.groups'));
\DBUtil::drop_table(\Config::get('sentry.table.users_metadata'));
\DBUtil::drop_table(\Config::get('sentry.table.users_groups'));
\DBUtil::drop_table(\Config::get('sentry.table.users_suspended'));
}
示例10: action_uninstall
public function action_uninstall()
{
if (\DBUtil::table_exists('blog')) {
\DBUtil::drop_table('blog');
}
if (\DBUtil::table_exists('blog_comment')) {
\DBUtil::drop_table('blog_comment');
}
echo 'Uninstall db tables for blog module completed.';
}
示例11: down
function down()
{
\DBUtil::drop_table('manifests');
\DBUtil::drop_table('manifest_datas');
\DBUtil::drop_table('aerodromes');
\DBUtil::drop_table('aircraft_arms');
\DBUtil::drop_table('flight_records');
\DBUtil::drop_table('people');
\DBUtil::drop_table('aircrafts');
\DBUtil::drop_table('manifest_people');
}
示例12: down
function down()
{
// get the driver used
\Config::load('auth', true);
$drivers = \Config::get('auth.driver', array());
is_array($drivers) or $drivers = array($drivers);
if (in_array('Ormauth', $drivers)) {
// get the tablename
\Config::load('ormauth', true);
$table = \Config::get('ormauth.table_name', 'users');
// drop the admin_users_perms table
\DBUtil::drop_table($table . '_permissions');
}
}
示例13: down
function down()
{
// get the drivers defined
$drivers = normalize_driver_types();
if (in_array('Ormauth', $drivers)) {
// get the tablename
\Config::load('ormauth', true);
$table = \Config::get('ormauth.table_name', 'users');
// make sure the configured DB is used
\DBUtil::set_connection(\Config::get('ormauth.db_connection', null));
// drop the admin_users_perms table
\DBUtil::drop_table($table . '_permissions');
}
// reset any DBUtil connection set
\DBUtil::set_connection(null);
}
示例14: down
function down()
{
// get the driver used
\Config::load('auth', true);
$drivers = \Config::get('auth.driver', array());
is_array($drivers) or $drivers = array($drivers);
if (in_array('Ormauth', $drivers)) {
// get the tablename
\Config::load('ormauth', true);
$table = \Config::get('ormauth.table_name', 'users');
// make sure the configured DB is used
\DBUtil::set_connection(\Config::get('ormauth.db_connection', null));
// drop the admin_users_role table
\DBUtil::drop_table($table . '_roles');
// drop the admin_users_role_perms table
\DBUtil::drop_table($table . '_role_permissions');
}
// reset any DBUtil connection set
\DBUtil::set_connection(null);
}
示例15: down
function down()
{
// get the driver used
\Config::load('auth', true);
$drivers = \Config::get('auth.driver', array());
is_array($drivers) or $drivers = array($drivers);
if (in_array('Simpleauth', $drivers)) {
// get the tablename
\Config::load('simpleauth', true);
$table = \Config::get('simpleauth.table_name', 'users') . '_providers';
} elseif (in_array('Ormauth', $drivers)) {
// get the tablename
\Config::load('ormauth', true);
$table = \Config::get('ormauth.table_name', 'users') . '_providers';
}
if (isset($table)) {
// drop the users remote table
\DBUtil::drop_table($table);
}
}