public function store()
 {
     $this->dirty['generateFiles'] = true;
     $this->application->log->add($this->prepareSQL());
     parent::store();
 }
Пример #2
0
 public function store()
 {
     if ($this->properties['identifier'] == 0) {
         $sql = "CREATE TABLE `" . $this->properties['name'] . "` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`)) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;";
         $this->application->dataLink->query($sql);
         if ($this->migration) {
             $this->migration->addCommit("Добавление связи `{$this->properties['name']}`");
             $this->migration->addObject($this->properties['name']);
             $this->migration->addSql("\n\t\t\t\t\tinsert ignore into\n\t\t\t\t\t\treferenceMap\n\t\t\t\t\t\t(`name`, `type`)\n\t\t\t\t\tvalues\n\t\t\t\t\t\t(" . $this->application->dataLink->quoteSmart($this->properties['name']) . ",\n\t\t\t\t\t\t " . $this->application->dataLink->quoteSmart($this->properties['type']) . ")\n\t\t\t\t");
             $this->migration->addSql($sql);
         }
         $this->application->log->add($sql);
         $this->application->log->add($this->prepareSQL());
     }
     $this->dirty['generateFiles'] = true;
     parent::store();
 }
Пример #3
0
 public function store()
 {
     if ($this->properties['dataType'] == BM_VT_OBJECT) {
         if (!isset($this->properties['referencedObjectId']) || $this->properties['referencedObjectId'] == 0) {
             echo '<b>Ошибка уровня ядра:</b> нет ссылки на dataObjectMap для объекта связи referenceField';
             exit;
         }
     }
     $this->application->log->add($this->prepareSQL());
     $this->dirty['generateFiles'] = true;
     parent::store();
 }