芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/bd.mgaplay.com.br/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AbstractAdapter.php
setOptions($options); if ($input !== null) { $this->setInput($input); } if ($output !== null) { $this->setOutput($output); } } /** * {@inheritdoc} */ public function setOptions(array $options) { $this->options = $options; if (isset($options['default_migration_table'])) { $this->setSchemaTableName($options['default_migration_table']); } return $this; } /** * {@inheritdoc} */ public function getOptions() { return $this->options; } /** * {@inheritdoc} */ public function hasOption($name) { return isset($this->options[$name]); } /** * {@inheritdoc} */ public function getOption($name) { if (!$this->hasOption($name)) { return null; } return $this->options[$name]; } /** * {@inheritdoc} */ public function setInput(InputInterface $input) { $this->input = $input; return $this; } /** * {@inheritdoc} */ public function getInput() { return $this->input; } /** * {@inheritdoc} */ public function setOutput(OutputInterface $output) { $this->output = $output; return $this; } /** * {@inheritdoc} */ public function getOutput() { if ($this->output === null) { $output = new NullOutput(); $this->setOutput($output); } return $this->output; } /** * {@inheritdoc} * * @return array */ public function getVersions() { $rows = $this->getVersionLog(); return array_keys($rows); } /** * Gets the schema table name. * * @return string */ public function getSchemaTableName() { return $this->schemaTableName; } /** * Sets the schema table name. * * @param string $schemaTableName Schema Table Name * @return $this */ public function setSchemaTableName($schemaTableName) { $this->schemaTableName = $schemaTableName; return $this; } /** * {@inheritdoc} */ public function hasSchemaTable() { return $this->hasTable($this->getSchemaTableName()); } /** * {@inheritdoc} */ public function createSchemaTable() { try { $options = [ 'id' => false, 'primary_key' => 'version' ]; $table = new Table($this->getSchemaTableName(), $options, $this); $table->addColumn('version', 'biginteger') ->addColumn('migration_name', 'string', ['limit' => 100, 'default' => null, 'null' => true]) ->addColumn('start_time', 'timestamp', ['default' => null, 'null' => true]) ->addColumn('end_time', 'timestamp', ['default' => null, 'null' => true]) ->addColumn('breakpoint', 'boolean', ['default' => false]) ->save(); } catch (\Exception $exception) { throw new \InvalidArgumentException('There was a problem creating the schema table: ' . $exception->getMessage()); } } /** * {@inheritdoc} */ public function getAdapterType() { return $this->getOption('adapter'); } /** * {@inheritdoc} */ public function isValidColumnType(Column $column) { return in_array($column->getType(), $this->getColumnTypes()); } /** * Determines if instead of executing queries a dump to standard output is needed * * @return bool */ public function isDryRunEnabled() { $input = $this->getInput(); return ($input && $input->hasOption('dry-run')) ? $input->getOption('dry-run') : false; } }