Adds messages in the migration for later use.
761400
public function addMessage($message) {
        $migrationName = get_class($this);
        $this->messages[] = sprintf("%s:  %s\n", $migrationName, $message);
    }
211852
def initiate_migration(self):
        
        self._client.post('{}/migrate'.format(Instance.api_endpoint), model=self)
385432
public function 
    {

        $count = $this->count();

        foreach ($this->migrations as $i => $mig) {
            if ($this->preCallback) {
                $callback = $this->preCallback;
                $callback($mig->getVersion(), $i, $count);
            }

            if ($this->direction == 'up') {
                $mig->up();
            } elseif ($this->direction == 'down') {
                $mig->down();
            }

            if ($this->postCallback) {
                $callback = $this->postCallback;
                $callback($mig->getVersion(), $i, $count);
            }
        }
    }
441706
def migrate(self):
        """"""
        with io.open(self.json_file, 'rt', encoding='utf8') as fh:
            threads = json.load(fh)
        progress = Progress(len(threads))

        for i, thread in enumerate(threads):
            progress.update(i, str(i))
            self.insert(thread)

        progress.finish("{0} threads, {1} comments".format(len(threads), self.count))
399300
async def SetStatusMessage(self, message):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='MigrationMaster',
                   request='SetStatusMessage',
                   version=1,
                   params=_params)
        _params['message'] = message
        reply = await self.rpc(msg)
        return reply
919252
public TrxMessageHeader addMessageProperties(TrxMessageHeader trxMessageHeader, MessageDetailTarget recMessageDetailTarget, MessageProcessInfo recMessageProcessInfo, MessageTransport recMessageTransport)
    {
        try {
            if (trxMessageHeader == null)
                trxMessageHeader = new TrxMessageHeader(null, null);
            ContactType recContactType = (ContactType)((ReferenceField)this.getField(MessageDetail.CONTACT_TYPE_ID)).getReferenceRecord(null);
            recContactType = (ContactType)recContactType.getContactType((Record)recMessageDetailTarget);
            if (recContactType == null)
                return trxMessageHeader;    // Just being careful
        
            this.setKeyArea(MessageDetail.CONTACT_TYPE_ID_KEY);
            this.getField(MessageDetail.CONTACT_TYPE_ID).moveFieldToThis((BaseField)recContactType.getCounterField());
            this.getField(MessageDetail.PERSON_ID).moveFieldToThis((BaseField)((Record)recMessageDetailTarget).getCounterField());
            this.getField(MessageDetail.MESSAGE_PROCESS_INFO_ID).moveFieldToThis((BaseField)recMessageProcessInfo.getCounterField());
            this.getField(MessageDetail.MESSAGE_TRANSPORT_ID).moveFieldToThis((BaseField)recMessageTransport.getCounterField());
            if (this.seek(null))
            {
                Map<String,Object> propHeader = ((PropertiesField)this.getField(MessageDetail.PROPERTIES)).loadProperties();
                if (propHeader == null)
                    propHeader = new HashMap<String,Object>(); // Never return null.
                Map<String,Object> map = trxMessageHeader.getMessageHeaderMap();
                if (map != null)
                    map.putAll(propHeader);
                else
                    map = propHeader;
                trxMessageHeader.setMessageHeaderMap(map);
                if ((recMessageTransport != null)
                    && ((recMessageTransport.getEditMode() == DBConstants.EDIT_CURRENT) || (recMessageTransport.getEditMode() == DBConstants.EDIT_IN_PROGRESS)))
                {
                    trxMessageHeader = recMessageTransport.addMessageProperties(trxMessageHeader);
                }
            }
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        // No need to free the two files as they are linked to the fields in this record
        
        return trxMessageHeader;
    }
1311122
public function migrateDown()
    {
        try {
            $this->builder->table(
                $this->table,
                function ($table) {
                    $table->string('value')->change();
                }
            );
        } catch (\Exception $e) {
            dd($e->getMessage());
        }
    }
689238
def create_migration(initial=False):
    """"""

    settings = DjangoSettings()
    if 'south' not in (name.lower() for name in settings.INSTALLED_APPS):
        print("Temporarily adding 'south' into INSTALLED_APPS.")
        settings.INSTALLED_APPS.append('south')

    kwargs = dict(initial=True) if initial else dict(auto=True)
    run_django_cmd('schemamigration', package['name'], **kwargs)
112988
public function migrateUp()
    {
        $this->builder->table(
            $this->table,
            function ($table) {
                $table->string('medium')->nullable()->index();
                $table->string('source')->nullable()->index();
                $table->string('search_terms_hash')->nullable()->index();
            }
        );

        $this->builder->table($this->foreign, function ($table) {
            $table->foreign('referer_id', 'tracker_referers_referer_id_fk')
                ->references('id')
                ->on('tracker_referers')
                ->onUpdate('cascade')
                ->onDelete('cascade');
        });
    }
96525
public function add($migrationName) {
		$list = $this->getList(false);
		if(isset($list[$migrationName]))
			return;
		$list[$migrationName] = ['added'=>time()+microtime(true)];
		$this->writeMigrations($list);
	}
517077
private void addMessage(ValidationMessage<Origin> message) {
		if (message == null) {
			return;
		}
		
		if( null != defaultOrigin ) {
			message.addOrigin( defaultOrigin );
		}
		
		this.messages.add(message);
	}
1162164
protected function createMigrations()
    {
        file_put_contents(
            $this->createUsersVerificationsMigration(),
            file_get_contents(__DIR__.'/stubs/migrations/users_verifications.stub')
        );

        file_put_contents(
            $this->createUsersMigration(),
            file_get_contents(__DIR__.'/stubs/migrations/users.stub')
        );

        $this->info('Migrations created successfully!');
    }
1329762
protected function registerMigrations()
    {
        $path = $this->getBasePath() . '/' . $this->convention->migrationsFolder();

        if ($this->app->runningInConsole() && is_dir($path)) {
            $this->loadMigrationsFrom($path);
        }
    }
633865
protected function importMigration(Migration $migration) {
    // Run dependencies first.
    $dependencies = $migration->getMigrationDependencies();
    $required_ids = $dependencies['required'];
    if ($required_ids) {
      $required_migrations = $this->migrationManager->createInstances($required_ids);
      array_walk($required_migrations, [$this, 'importMigration']);
    }

    $message = new MigrateMessage();
    $executable = new MigrateExecutable($migration, $message);
    $executable->import();
  }
598307
protected function loadMigrations()
    {
        $this->loadMigrationsFrom(__DIR__ . '/../../../database/migrations');

        if ($this->app['config']->get('jumpgate.users.enable_social')) {
            $this->loadMigrationsFrom(__DIR__ . '/../../../database/social_migrations');
        }
    }
848852
def add_messages(self, messages):
        
        # remove old messages
        if len(messages) > self.limit:
            messages = messages[:self.limit]
        _logger(self.__class__).log(5, 'adding %s messages' % len(messages))
        self._finished = False
        self._new_messages = messages
        self._to_check = list(self._messages)
        self._pending_msg = messages
        # start removing messages, new message won't be added until we
        # checked all message that need to be removed
        QtCore.QTimer.singleShot(1, self._remove_batch)
1164796
protected function addContextToMessages()
    {
        $context = $this->getContextMessage();

        if ($context === []) {
            return;
        }

        foreach ($this->messages as &$message) {
            $message[0] = ArrayHelper::merge($context, $this->parseText($message[0]));
        }
    }