code: private function getCommand(DatabaseObjectInterface $databaseObject, $isCreate = true)
      {
          if ($databaseObject instanceof Column) {
             $command = $this->container
                  ->get($isCreate ? 'rentgen.add_column' : 'rentgen.drop_column')
                  ->setColumn($databaseObject);
          } elseif ($databaseObject instanceof ConstraintInterface) {
              $command = $this->container
                  ->get($isCreate ? 'rentgen.add_constraint' : 'rentgen.drop_constraint')
                  ->setConstraint($databaseObject);
          } elseif ($databaseObject instanceof Index) {
              $command = $this->container
                  ->get($isCreate ? 'rentgen.create_index' : 'rentgen.drop_index')
                  ->setIndex($databaseObject);
          } elseif ($databaseObject instanceof Schema) {
             $command = $this->container
                  ->get($isCreate ? 'rentgen.create_schema' : 'rentgen.drop_schema')
                  ->setSchema($databaseObject);
          } elseif ($databaseObject instanceof Table) {
              $command = $this->container
                  ->get($isCreate ? 'rentgen.create_table' : 'rentgen.drop_table')
                  ->setTable($databaseObject);
          } else {
              throw new \Exception(sprintf("Class %s is not supported", get_class($databaseObject)));
          }
  
          return $command;
      }
docs: Get a command to execute.
  
  @param DatabaseObjectInterface $databaseObject Database object.
  @param bool                    $cascade        Drop databse object cascade.
  
  @return Rentgen\Schema\Command