Menu

Updates without dropping columns.

2006-01-20
2013-04-01
  • James Johnson

    James Johnson - 2006-01-20

    I would like to be able to modify a schema and not have it drop columns that no longer exists.  Is this possible?

     
    • Wiktor Ihárosi

      Wiktor Ihárosi - 2007-08-04

      i did this...

      $sql = $schema->ParseSchema($this->schemaFile);
      foreach ($sql as $key => $value) {
          if (strstr($value, "DROP")) {
              unset($sql[$key]);
          }
      }
      $result = $schema->ExecuteSchema($sql);

      lame, but works :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.