本文整理汇总了PHP中xmldb_field::setNotnull方法的典型用法代码示例。如果您正苦于以下问题:PHP xmldb_field::setNotnull方法的具体用法?PHP xmldb_field::setNotnull怎么用?PHP xmldb_field::setNotnull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xmldb_field
的用法示例。
在下文中一共展示了xmldb_field::setNotnull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xmldb_questionnaire_upgrade
//.........这里部分代码省略.........
if ($questionnaire->resp_eligible == 'teachers') {
assign_capability($capsubmit, CAP_ALLOW, $editteacherroleid, $context->id, true);
assign_capability($capsubmit, CAP_ALLOW, $teacherroleid, $context->id, true);
assign_capability($capview, CAP_PREVENT, $studentroleid, $context->id, true);
assign_capability($capsubmit, CAP_PREVENT, $studentroleid, $context->id, true);
}
}
}
$rs->close();
}
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008031904, 'questionnaire');
}
if ($oldversion < 2008031905) {
$table = new xmldb_table('questionnaire_survey');
$field = new xmldb_field('changed');
$dbman->drop_field($table, $field);
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008031905, 'questionnaire');
}
if ($oldversion < 2008031906) {
$table = new xmldb_table('questionnaire_response_rank');
$field = new xmldb_field('rank');
$field->set_attributes(XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null, null, '0', 'choice_id');
$field->setUnsigned(false);
$dbman->change_field_unsigned($table, $field);
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008031906, 'questionnaire');
}
if ($oldversion < 2008060401) {
$table = new xmldb_table('questionnaire_question');
$field = new xmldb_field('name');
$field->set_attributes(XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, null, 'survey_id');
$field->setNotnull(false);
$dbman->change_field_notnull($table, $field);
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008060401, 'questionnaire');
}
if ($oldversion < 2008070702) {
$table = new xmldb_table('questionnaire_question_type');
$field = new xmldb_field('response_table');
$field->set_attributes(XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null, null, null, 'has_choices');
$field->setNotnull(false);
$dbman->change_field_notnull($table, $field);
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008070702, 'questionnaire');
}
if ($oldversion < 2008070703) {
$table = new xmldb_table('questionnaire_resp_multiple');
$index = new xmldb_index('response_question');
$index->set_attributes(XMLDB_INDEX_NOTUNIQUE, array('response_id', 'question_id', 'choice_id'));
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008070703, 'questionnaire');
}
if ($oldversion < 2008070704) {
// CONTRIB-1542.
$table = new xmldb_table('questionnaire_survey');
$field = new xmldb_field('email');
$field->set_attributes(XMLDB_TYPE_CHAR, '64', null, XMLDB_NOTNULL, null, null, null, null, 'title');
$field->setLength('255');
$dbman->change_field_precision($table, $field);
// Questionnaire savepoint reached.
upgrade_mod_savepoint(true, 2008070704, 'questionnaire');