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
#When i run a migration and create all tables for the models below.
I run into the error when creating invoice and trying to add invoiceitem to that invoice
Error:"(1146, "Table 'defaultdb.invoices_invoice_items' doesn't exist")"
#When i run a migration and create all tables for the models below.
I run into the error when creating invoice and trying to add invoiceitem to that invoice
Error:"(1146, "Table 'defaultdb.invoices_invoice_items' doesn't exist")"
after manually creating "invoices_invoice_items" using the sql schema below
example:
"CREATE TABLE IF NOT EXISTS
invoices_invoice_items
(invoice_id
CHAR(36) NOT NULL,invoice_item_id
CHAR(36) NOT NULL,CONSTRAINT
fk_invoices_invoice_items_invoice_id
FOREIGN KEY (invoice_id
) REFERENCESinvoices
(id
) ON DELETE CASCADE,CONSTRAINT
fk_invoices_invoice_items_invoice_item_id
FOREIGN KEY (invoice_item_id
) REFERENCESinvoice_items
(id
) ON DELETE CASCADE,PRIMARY KEY (
invoice_id
,invoice_item_id
)) CHARACTER SET utf8mb4 COMMENT='Join table for InvoiceModel and InvoiceItemModel';"
Now when i try to create an invoice after building all the tables. The new error i get is "(1054, "Unknown column 'invoices_id' in 'where clause'")"
The text was updated successfully, but these errors were encountered: