Initial project files: BESCMS full source
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 更新数据结构
|
||||
**/
|
||||
|
||||
$m = \Phpcmf\Service::M();
|
||||
$t = \Phpcmf\Service::M('table');
|
||||
$prefix = $m->prefix;
|
||||
|
||||
foreach ($this->site as $siteid) {
|
||||
$table = $prefix.$siteid.'_block';
|
||||
if ($m->is_table_exists($table) && !$m->is_field_exists($table, 'code')) {
|
||||
$t->add_field($table, 'code', 'VARCHAR(100)', 'NOT NULL', '');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user