You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATETABLE `CheckoutCartItem`
(
`checkoutCartItemId`int(10) unsigned NOT NULL AUTO_INCREMENT,
`checkoutCartId`int(10) unsigned NOT NULL,
`timeCreated`timestampNOT NULL COMMENT 'time when the item was added to the cart for the first time',
`itemId`int(10) unsigned NOT NULL,
`skuid`varchar(64) DEFAULT NULL COMMENT 'additional identifier for item (e.g. skuid that defines required size of shoe)',
`quantity`int(10) unsigned NOT NULL COMMENT 'quantity of item in cart',
`availableQuantity`int(10) unsigned NOT NULL COMMENT 'available quantity when user last seen the product - by this is detected change and user is notified about it',
`discount`decimal(12, 3) unsigned NOT NULL DEFAULT 0.000 COMMENT 'applied discount to the product totalAmount',
`tax`tinyint(2) unsigned NOT NULL DEFAULT 0 COMMENT 'applied VAT to the amount',
`amountPerItem`decimal(13, 4) NOT NULL COMMENT 'amount per item with VAT (by this is detected change and user is notified about it)',
`amountPerItemExcludingVat`decimal(13, 4) NOT NULL COMMENT 'amount per item without VAT',
`totalAmount`decimal(13, 4) NOT NULL COMMENT 'amount * quantity +/- special tax, discount, ... with VAT (by this is detected change and user is notified about it)',
`totalAmountExcludingVat`decimal(13, 4) NOT NULL COMMENT 'amount * quantity +/- special tax, discount, ... without VAT',
PRIMARY KEY (`checkoutCartItemId`),
UNIQUE KEY `checkoutCartId_itemId` (`checkoutCartId`, `itemId`),
CONSTRAINT`checkoutCartItem_ibfk_1`FOREIGN KEY (`checkoutCartId`) REFERENCES`CheckoutCart` (`checkoutCartId`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
code:
importglobimportosfromddlparse.ddlparseimportDdlParseforfilenameinglob.glob('/home/jirka/Projekty/Glami/klarka/schema/mysql/tables/CheckoutCartItem.sql'): # TODO allwithopen(filename, 'r') asf: # open in readonly modetable=DdlParse().parse(f.read(), source_database=DdlParse.DATABASE.mysql)
forcolintable.columns.values():
print(col.name)
output columns:
checkoutCartItemId
unsigned
NULL
checkoutCartId
The text was updated successfully, but these errors were encountered:
Create statement:
code:
output columns:
The text was updated successfully, but these errors were encountered: