src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php
protected function getEnum($table)
	{
		try {
			$result = DB::table('information_schema.columns')
				->where('table_schema', $this->database)
				->where('table_name', $table)
				->where('data_type', 'enum')
				->get(['column_name','column_type']);
			if ($result)
				return $result;
			else
				return [];
		} catch (\Exception $e){
			return [];
		}
	}
protected function getEnum($table)
	{
		try {
			$result = DB::table('information_schema.columns')
				->where('table_schema', $this->database)
				->where('table_name', $table)
				->where('data_type', 'enum')
				->get(['column_name','column_type']);
			if ($result)
				return $result;
			else
				return [];
		} catch (\Exception $e){
			return [];
		}
	}
protected function getEnum ( $ table ) { try { $ result = DB :: table ( 'information_schema.columns' ) -> where ( 'table_schema' , $ this -> database ) -> where ( 'table_name' , $ table ) -> where ( 'data_type' , 'enum' ) -> get ( [ 'column_name' , 'column_type' ] ) ; if ( $ result ) return $ result ; else return [ ] ; } catch ( \ Exception $ e ) { return [ ] ; } }
Return all enum columns for a given table
@param string $table
@return array
Return all enum columns for a given table