Adds the slug_column to the current table.
336358
public function modifyTable()
    {
        $table = $this->getTable();

        if (!$table->hasColumn($this->getParameter('slug_column'))) {
            $table->addColumn([
                'name'     => $this->getParameter('slug_column'),
                'type'     => 'VARCHAR',
                'size'     => 255,
                'required' => false,
            ]);
            // add a unique to column
            if ('true' === $this->getParameter('unique_constraint')) {
                $this->addUniqueConstraint($table);
            }
        }
    }
982337
def add(self, entries, table=None, columns=None, ignore=False):
        """"""
        # Default table and columns #
        if table is None:   table   = self.main_table
        if columns is None: columns = self.get_columns_of_table(table)
        # Default columns #
        question_marks = ','.join('?' for c in columns)
        cols           = ','.join('"' + c + '"' for c in columns)
        ignore         = " OR IGNORE" if ignore else ""
        sql_command    = 'INSERT%s into "%s"(%s) VALUES (%s);'
        sql_command    = sql_command % (ignore, table, cols, question_marks)
        # Possible errors we want to catch #
        errors  = (sqlite3.OperationalError, sqlite3.ProgrammingError)
        errors += (sqlite3.IntegrityError, sqlite3.InterfaceError, ValueError)
        # Do it #
        try:
            new_cursor = self.own_connection.cursor()
            new_cursor.executemany(sql_command, entries)
        except errors as err:
            raise Exception(self.detailed_error(sql_command, columns, entries, err))
        except KeyboardInterrupt as err:
            print("You interrupted the data insertion.")
            print("Committing everything done up to this point.")
            self.own_connection.commit()
            raise err
1233858
public function setupListTableField($slug)
    {
        add_filter('manage_edit-' . $slug . '_columns', array($this, 'listTableColumns'));
        add_action('manage_' . $slug . '_posts_custom_column', array($this, 'listTableColumnContent'), 10, 2);
        add_filter('manage_edit-' . $slug . '_sortable_columns', array($this, 'listTableColumnSorting'));
    }
14897
public function change()
    {
        $table = $this->table('link', array('id' => false, 'primary_key' => array('link')));
        $table->addColumn('link', 'string', array('limit' => 100))
              ->addColumn('url', 'string', array('limit' => 500))
              ->addColumn('active', 'boolean')
              ->create();
    }
234848
public function change()
    {
        $table = $this->table('permissions');
        
        $table->addColumn('owner_model', 'string', [
            'default' => null,
            'null' => false,
            'limit' => 50,
        ]);

        $table->removeColumn('user_id');
        $table->removeColumn('is_active');

        $table->addColumn('owner_foreign_key', 'char', [
            'default' => null,
            'null' => false,
            'limit' => 36 
        ]);

        $table->save();
    }
650691
def addColumn(self, column):
        
        column.setSchema(self)
        self.__columns[column.name()] = column
1264788
protected function setSlugInCmsTable($slug)
    {
        /** @var CmsModel|SluggableTrait $this */
        $existing   = $this->getSlugRecordFromCmsTable();
        $languageId = $this->storeSlugForLanguageId();

        // update if exists
        if ($existing) {

            DB::table(static::$slugsTable)
                ->where('id', $existing->id)
                ->update([ static::$slugsColumn => $slug ]);

            return;
        }

        // if the model has no id, cannot store slug for it
        if ( ! $this->exists) return;

        $entryId = $this->isTranslationModel()
                    ?   $this->getAttribute(config('pxlcms.translatable.translation_foreign_key'))
                    :   $this->getKey();

        // create new entry
        DB::table(static::$slugsTable)
            ->insert([
                static::$slugsColumn      => $slug,
                static::$slugsModuleKey   => $this->getModuleNumber(),
                static::$slugsEntryKey    => $entryId,
                static::$slugsLanguageKey => $languageId,
            ]);
    }
1181635
def add_column(self, tablename: str, fieldspec: FIELDSPEC_TYPE) -> int:
        """"""
        sql = "ALTER TABLE {} ADD COLUMN {}".format(
            tablename, self.fielddefsql_from_fieldspec(fieldspec))
        log.info(sql)
        return self.db_exec_literal(sql)
572775
def add_column(connection, column):
    
    stmt = alembic.ddl.base.AddColumn(_State.table.name, column)
    connection.execute(stmt)
    _State.reflect_metadata()
743351
def add_table(self, dataframe, isStyled = False):
        """"""

        if isStyled :
            table_string = dataframe.render()
        else :
            table_string = dataframe.style.render()
            
        table_string = table_string.replace("\n", "").replace("<table", """<table class = "table table-sm table-hover" """).replace("<thead>", """<thead class="thead-inverse">""")
        self.table = table_string
475316
public function initSlugTrait()
    {
        $slugs = isset(static::$slugs) ? static::$slugs : ['title' => 'slug'];

        $slugger = function ($entity) use ($slugs) {
            foreach ($slugs as $column => $slug_column) {
                //do nothing if the slug has been manually modified
                if (in_array($slug_column, $entity->getModifiedFields())) {
                    continue;
                }

                $entity->setRaw($slug_column, $this->slugify($entity->getRaw($column)));
            }
        };

        $this->addEventCallBack('insert', $slugger);
        $this->addEventCallBack('update', $slugger);
    }
159611
public function addSelfSelectColumns()
    {
        call_user_func(array($this->modelPeerName, 'addSelectColumns'), $this, $this->useAliasInSQL ? $this->modelAlias : null);

        return $this;
    }
604256
public function addColumn($column, $type, $table = null)
    {
        return $this->db->alterTable($this->getTable($table))
                        ->addColumn($column, $type)
                        ->execute();
    }
747845
public void addColumn(DefaultTableColumn column) {
        column.setModelIndex(columnModel.getColumnCount());
        columnModel.addColumn(column);
    }
1037524
function _addColumn(){
    self._visitingAlter = true;
    var table = self._queryNode.table;
    self._visitingAddColumn = true;
    var result='ALTER TABLE '+self.visit(table.toNode())+' ADD ('+self.visit(alter.nodes[0].nodes[0]);
    for (var i= 1,len=alter.nodes.length; i<len; i++){
      var node=alter.nodes[i];
      assert(node.type=='ADD COLUMN',errMsg);
      result+=', '+self.visit(node.nodes[0]);
    }
    result+=')';
    self._visitingAddColumn = false;
    self._visitingAlter = false;
    return [result];
  }
747927
public function modifyTable()
    {
        $table = $this->getTable();
        $primary_string = $this->getParameter('primary_string');

        if(!$primary_string) {
            $this->exceptionError('Need set parameter "primary_string" in table '.$table->getName());
        }

        if(!$table->hasColumn($primary_string)) {
            $this->exceptionError('Not found column "'.$primary_string.'" in table '.$table->getName());
        }
    }
479108
def _add_column(self, column):
        
        self._columns.append(column)
        if self._blist:
            self._data.append(blist([None] * len(self._index)))
        else:
            self._data.append([None] * len(self._index))