fix(stock-location): Stock location address required (#3065)

What:
- Removes the requirement to have an address id while creating a new stock location.
- Add field company to Location Address

FIXES: CORE-1018

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Carlos R. L. Rodrigues
2023-01-23 12:47:04 +00:00
committed by GitHub
co-authored by Oliver Windall Juhl
parent f65f590a27
commit 2d525237b6
8 changed files with 51 additions and 32 deletions
@@ -55,6 +55,7 @@ export class setup1665749860179 implements MigrationInterface {
"deleted_at" TIMESTAMP WITH TIME zone,
"address_1" TEXT NOT NULL,
"address_2" TEXT,
"company" TEXT,
"city" TEXT,
"country_code" TEXT NOT NULL,
"phone" TEXT,
@@ -73,12 +74,12 @@ export class setup1665749860179 implements MigrationInterface {
"updated_at" TIMESTAMP WITH time zone NOT NULL DEFAULT Now(),
"deleted_at" TIMESTAMP WITH time zone,
"name" TEXT NOT NULL,
"address_id" TEXT NOT NULL,
"address_id" TEXT,
"metadata" JSONB,
CONSTRAINT "PK_adf770067d0df1421f525fa25cc" PRIMARY KEY ("id")
);
CREATE INDEX "IDX_stock_location_address_id" ON "stock_location" ("address_id");
CREATE INDEX "IDX_stock_location_address_id" ON "stock_location" ("address_id") WHERE deleted_at IS NOT NULL;
`)
}