classAlterationRefused
final class AlterationRefused
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.An ALTER TABLE request SQLite refuses because of what it adds or drops.
Source: https://sqlite.org/lang_altertable.html.
(new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('ALTER TABLE t ADD COLUMN code TEXT UNIQUE') // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\SemanticException: A UNIQUE column cannot be added.Properties§
public AlterationObstacle $obstacleMethods§
public function __construct(public AlterationObstacle $obstacle)Parameters
$obstacle | AlterationObstacle | Why the request is refused |
public function message(): stringDescribes the problem.
Returns
stringTest cases 1
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 4
AlterationProblemsTest::testAddedReportsEveryObstacleOfTheNewColumncallsAlterationProblemsTest::testDroppedReportsAnUnknownColumnAndTheOnlyColumncallsAlterAddColumnTest::testDeriveStatementReportsWhatRulesTheAdditionOutcallsAlterDropColumnTest::testDeriveStatementReportsTheRemovalOfTheOnlyColumncalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems::added() packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:122
- new SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems::dropped() packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:136