List migration issues.

        Returns paginated migration issues
349041
def list_migration_issues_courses(self, course_id, content_migration_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - course_id
        """ID"""
        path["course_id"] = course_id

        # REQUIRED - PATH - content_migration_id
        """ID"""
        path["content_migration_id"] = content_migration_id

        self.logger.debug("GET /api/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/courses/{course_id}/content_migrations/{content_migration_id}/migration_issues".format(**path), data=data, params=params, all_pages=True)
341137
def rollback_migration(engine, connection, path, migration_to_rollback):
    

    # Get migrations applied
    migrations_applied = get_migrations_applied(engine, connection)

    # Ensure that the migration was previously applied
    if not is_applied(migrations_applied, migration_to_rollback):
        raise RuntimeError(
            '`%s` is not in the list of previously applied migrations.' % (migration_to_rollback))

    # Rollback file
    file = path + migration_to_rollback + '/down.sql'

    # Ensure that the file exists
    check_exists(file)

    # Set vars
    basename = os.path.basename(os.path.dirname(file))

    # Get migration source
    source = get_migration_source(file)
    # print (source);

    # Run migration rollback
    run_migration(connection, source, engine)

    # Delete migration
    delete_migration(connection, basename)

    # Log
    print('   -> Migration `%s` has been rolled back' % (basename))

    return True
722569
def run_migration_list(self, path, migrations, pretend=False):
        
        if not migrations:
            self._note("<info>Nothing to migrate</info>")

            return

        batch = self._repository.get_next_batch_number()

        for f in migrations:
            self._run_up(path, f, batch, pretend)
1123846
def get_migrations_to_down(self, migration_id):
        """"""
        migration_id = MigrationFile.validate_id(migration_id)
        if not migration_id:
            return []

        migrations = self.get_migration_files()
        last_migration_id = self.get_last_migrated_id()

        if migration_id in (m.id for m in self.get_unregistered_migrations()):
            logger.error('Migration is not applied %s' % migration_id)
            return []

        try:
            migration = [m for m in migrations if m.id == migration_id][0]
        except IndexError:
            logger.error('Migration does not exists %s' % migration_id)
            return []

        return list(reversed([m for m in migrations
                              if migration.id <= m.id <= last_migration_id]))
1289558
@Override
	public List<Issue> listAllIssues() {
		return getRestOperations().exchange(buildUri("/issues?per_page=25"), HttpMethod.GET, null, issueListTypeRef).getBody();
	}
439649
def list(database=None, directory=None, verbose=None):
    """"""
    router = get_router(directory, database, verbose)
    click.echo('Migrations are done:')
    click.echo('\n'.join(router.done))
    click.echo('')
    click.echo('Migrations are undone:')
    click.echo('\n'.join(router.diff))
433030
def get_issue_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.IssueComment.IssueComment,
            self._requester,
            self.issue_url + "/comments",
            None
        )
1155448
def howToMigrate(self, fromVersion, toVersion=None):
        
        # slice notation [start:end:step]
        # by adding a step of 1 we make a slice from 0:0 be empty
        # rather than containing the whole list.
        if toVersion is not None:
            return self.migrations[fromVersion:toVersion:1]
        else:
            return self.migrations[fromVersion::1]
42500
def get_vm_list(self):
        """"""
        action = "list all guests in database"
        with zvmutils.log_and_reraise_sdkbase_error(action):
            guests_in_db = self._GuestDbOperator.get_guest_list()
            guests_migrated = self._GuestDbOperator.get_migrated_guest_list()

        # db query return value in tuple (uuid, userid, metadata, comments)
        userids_in_db = [g[1].upper() for g in guests_in_db]
        userids_migrated = [g[1].upper() for g in guests_migrated]
        userid_list = list(set(userids_in_db) - set(userids_migrated))

        return userid_list
1261425
def list_migration_issues_groups(self, group_id, content_migration_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - group_id
        """ID"""
        path["group_id"] = group_id

        # REQUIRED - PATH - content_migration_id
        """ID"""
        path["content_migration_id"] = content_migration_id

        self.logger.debug("GET /api/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/groups/{group_id}/content_migrations/{content_migration_id}/migration_issues".format(**path), data=data, params=params, all_pages=True)
1026719
def list(cls, state=None, page=None, per_page=None):
        
        conn = Qubole.agent()
        params = {}
        if page:
            params['page'] = page
        if per_page:
            params['per_page'] = per_page
        if (params.get('page') or params.get('per_page')) and Qubole.version == 'v1.2':
            log.warn("Pagination is not supported with API v1.2. Fetching all clusters.")
        params = None if not params else params
        cluster_list = conn.get(cls.rest_entity_path, params=params)
        if state is None:
            return cluster_list
        elif state is not None:
            result = []
            if Qubole.version == 'v1.2':
                for cluster in cluster_list:
                    if state.lower() == cluster['cluster']['state'].lower():
                        result.append(cluster)
            elif Qubole.version == 'v1.3':
                cluster_list = cluster_list['clusters']
                for cluster in cluster_list:
                    if state.lower() == cluster['state'].lower():
                        result.append(cluster)
            return result
451422
def unindex_layers_with_issues(self, use_cache=False):
    
    from hypermap.aggregator.models import Issue, Layer, Service
    from django.contrib.contenttypes.models import ContentType

    layer_type = ContentType.objects.get_for_model(Layer)
    service_type = ContentType.objects.get_for_model(Service)

    for issue in Issue.objects.filter(content_type__pk=layer_type.id):
        unindex_layer(issue.content_object.id, use_cache)

    for issue in Issue.objects.filter(content_type__pk=service_type.id):
        for layer in issue.content_object.layer_set.all():
            unindex_layer(layer.id, use_cache)
334576
def get_issues():
        """"""
        issues = []
        for entry in Logger.journal:
            if entry.level >= WARNING:
                issues.append(entry)
        return issues
1360975
public function index()
    {
        // if all migrations are not yet installed or missing settings table,
        // then start the initial install with admin and master template choices
        if (count($this->migrations_tables) == count($this->inactiveMigrations())
            || in_array('2015_10_08_123457_create_settings_table', $this->inactiveMigrations())
        ) {
            $views_files_list = $this->viewsFilesList(resource_path('views')) + ['another' => trans('ticketit::install.another-file')];
            $inactive_migrations = $this->inactiveMigrations();
            // if Laravel v5.2 or 5.3
            if (version_compare(app()->version(), '5.2.0', '>=')) {
                $users_list = User::pluck('name', 'id')->toArray();
            } else { // if Laravel v5.1
                $users_list = User::lists('name', 'id')->toArray();
            }

            return view('ticketit::install.index', compact('views_files_list', 'inactive_migrations', 'users_list'));
        }

        // other than that, Upgrade to a new version, installing new migrations and new settings slugs
        if (Agent::isAdmin()) {
            $inactive_migrations = $this->inactiveMigrations();
            $inactive_settings = $this->inactiveSettings();

            return view('ticketit::install.upgrade', compact('inactive_migrations', 'inactive_settings'));
        }
        \Log::emergency('Ticketit needs upgrade, admin should login and visit ticketit-install to activate the upgrade');

        throw new \Exception('Ticketit needs upgrade, admin should login and visit ticketit install route');
    }
320162
def get_issues_by_resource(resource_id, table):
    """"""

    v1_utils.verify_existence_and_get(resource_id, table)

    # When retrieving the issues for a job, we actually retrieve
    # the issues attach to the job itself + the issues attached to
    # the components the job has been run with.
    if table.name == 'jobs':
        JJI = models.JOIN_JOBS_ISSUES
        JJC = models.JOIN_JOBS_COMPONENTS
        JCI = models.JOIN_COMPONENTS_ISSUES

        # Get all the issues attach to all the components attach to a job
        j1 = sql.join(
            _TABLE,
            sql.join(
                JCI,
                JJC,
                sql.and_(
                    JCI.c.component_id == JJC.c.component_id,
                    JJC.c.job_id == resource_id,
                ),
            ),
            _TABLE.c.id == JCI.c.issue_id,
        )

        query = sql.select([_TABLE]).select_from(j1)
        rows = flask.g.db_conn.execute(query)
        rows = [dict(row) for row in rows]

        # Get all the issues attach to a job
        j2 = sql.join(
            _TABLE,
            JJI,
            sql.and_(
                _TABLE.c.id == JJI.c.issue_id,
                JJI.c.job_id == resource_id
            )
        )
        query2 = sql.select([_TABLE]).select_from(j2)
        rows2 = flask.g.db_conn.execute(query2)
        rows += [dict(row) for row in rows2]

    # When retrieving the issues for a component, we only retrieve the
    # issues attached to the specified component.
    else:
        JCI = models.JOIN_COMPONENTS_ISSUES

        query = (sql.select([_TABLE])
                 .select_from(JCI.join(_TABLE))
                 .where(JCI.c.component_id == resource_id))

        rows = flask.g.db_conn.execute(query)
        rows = [dict(row) for row in rows]

    for row in rows:
        if row['tracker'] == 'github':
            l_tracker = github.Github(row['url'])
        elif row['tracker'] == 'bugzilla':
            l_tracker = bugzilla.Bugzilla(row['url'])
        row.update(l_tracker.dump())

    return flask.jsonify({'issues': rows,
                          '_meta': {'count': len(rows)}})
517655
def list_migrations(self):
        
        connection = connections[self._database_name]
        loader = MigrationLoader(connection, ignore_no_migrations=True)
        unapplied = self._get_unapplied_migrations(loader)
        currents = self._get_current_migration_state(loader, [u[0] for u in unapplied])
        return unapplied, currents
67125
public function getAppliedMigrations( )
    {
        $query = "SELECT * FROM $this->migrationTable";
        
        $applied = $this->db->query( $query );
        
        $list = array();
        
        foreach( $applied as $mig )
        {
            $list[] = $mig[ 'migration_name' ];
        }
        
        $list = array_reverse( $list );
        
        return $this->filter( self::ON_GET_APPLIED_MIGRATIONS_FILTER, $list );
    }