Closed jasonmp85 closed 9 years ago
@sumedhpathak also confirms that TableDDLCommandList
will not produce a PRIMARY KEY
modifier within a CREATE TABLE
command, as it uses constraint modifiers and standalone CREATE INDEX
statements instead (see here). So ExtendDDLCommand
problem with this modifier is a non-issue.
Let's say I have a DDL command similar to the following:
When passed to
ExtendDDLCommand
with a shard ID of12345
, we get:While propagating the
UNIQUE
property of aPRIMARY KEY
might be questionable in a sharded environment, theNOT NULL
property isn't as ambiguous: we should definitely be propagating it.Not that—as in #42—this is a theoretical problem.
ExtendDDLCommand
only technically needs to support the subset of DDL commands produced byTableDDLCommandList
. I so far cannot get the latter to produce aCREATE TABLE
statement with aPRIMARY KEY
clause (it usually turns those into aCREATE TABLE
statement followed by anALTER TABLE
statement), but if this ever changes we'll have a problem.