Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None

      Description

      Today I have started with implemention migrations in my project.
      But I found that only MySQL supported.

      /**
       * Returns the current migrated version from the versions table.
       *
       * @return bool $currentVersion
       */
        public function getCurrentVersion()
        {
            $this->createMigrationTable();
      
            $result = $this->connection->fetchColumn("SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC LIMIT 1");
            return $result !== false ? (string) $result : '0';
        }

      In my project I use MSSQL db.
      Do you plan to use platform independent solution?

        Activity

        Yaroslav Zenin created issue -
        Yaroslav Zenin made changes -
        Field Original Value New Value
        Description Today I have started with implemention migrations in my project.
        But I found that only MySQL supported.

            /**
             * Returns the current migrated version from the versions table.
             *
             * @return bool $currentVersion
             */
            public function getCurrentVersion()
            {
                $this->createMigrationTable();

                $result = $this->connection->fetchColumn("SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC LIMIT 1");
                return $result !== false ? (string) $result : '0';
            }


        In my project I use MSSQL db.
        Do you plan to use platform independent solution?
        Today I have started with implemention migrations in my project.
        But I found that only MySQL supported.

        {noformat}/**
         * Returns the current migrated version from the versions table.
         *
         * @return bool $currentVersion
         */
          public function getCurrentVersion()
          {
              $this->createMigrationTable();

              $result = $this->connection->fetchColumn("SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC LIMIT 1");
              return $result !== false ? (string) $result : '0';
          }{noformat}

        In my project I use MSSQL db.
        Do you plan to use platform independent solution?
        Benjamin Eberlei made changes -
        Assignee Jonathan H. Wage [ jwage ] Benjamin Eberlei [ beberlei ]
        Hide
        Kim Hemsø added a comment - - edited

        Seem this is already been fixed:

        $sql = "SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC";
        $sql = $this->connection->getDatabasePlatform()->modifyLimitQuery($sql, 1);
        $result = $this->connection->fetchColumn($sql);
        return $result !== false ? (string) $result : '0';

        You can skip my PR-52, if you want since. My plan was to fix it with the query builder

        Show
        Kim Hemsø added a comment - - edited Seem this is already been fixed: $sql = "SELECT version FROM " . $this->migrationsTableName . " ORDER BY version DESC"; $sql = $this->connection->getDatabasePlatform()->modifyLimitQuery($sql, 1); $result = $this->connection->fetchColumn($sql); return $result !== false ? (string) $result : '0'; You can skip my PR-52, if you want since. My plan was to fix it with the query builder
        Hide
        Benjamin Eberlei added a comment -

        Was already fixed

        Show
        Benjamin Eberlei added a comment - Was already fixed
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DMIG-23, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Yaroslav Zenin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: