mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 13:49:33 +00:00
Merge remote-tracking branch 'origin/feature/custom-part-status' into feature/all-features
# Conflicts: # docs/configuration.md # migrations/Version20250321141740.php # src/Entity/Attachments/Attachment.php # src/Entity/Base/AbstractDBElement.php # src/Entity/LogSystem/CollectionElementDeleted.php # src/Entity/LogSystem/LogTargetType.php # src/Entity/Parameters/AbstractParameter.php # src/Entity/Parts/PartCustomState.php # src/Security/Voter/AttachmentVoter.php # templates/parts/edit/_advanced.html.twig # tests/Controller/AdminPages/PartCustomStateControllerTest.php # translations/messages.cs.xlf # translations/messages.el.xlf # translations/messages.fr.xlf # translations/messages.ja.xlf # translations/messages.nl.xlf
This commit is contained in:
commit
73a2b16332
7 changed files with 170 additions and 176 deletions
|
|
@ -43,10 +43,10 @@ final class Version20250321141740 extends AbstractMultiPlatformMigration
|
|||
public function sqLiteUp(Schema $schema): void
|
||||
{
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE TEMPORARY TABLE __temp__parts AS
|
||||
SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
CREATE TEMPORARY TABLE __temp__parts AS
|
||||
SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
|
|
@ -82,7 +82,7 @@ final class Version20250321141740 extends AbstractMultiPlatformMigration
|
|||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint
|
||||
eda_info_kicad_footprint
|
||||
FROM parts
|
||||
SQL);
|
||||
|
||||
|
|
@ -181,8 +181,8 @@ final class Version20250321141740 extends AbstractMultiPlatformMigration
|
|||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint)
|
||||
SELECT
|
||||
eda_info_kicad_footprint)
|
||||
SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
|
|
@ -219,7 +219,7 @@ final class Version20250321141740 extends AbstractMultiPlatformMigration
|
|||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint
|
||||
eda_info_kicad_footprint
|
||||
FROM __temp__parts
|
||||
SQL);
|
||||
|
||||
|
|
@ -271,45 +271,45 @@ final class Version20250321141740 extends AbstractMultiPlatformMigration
|
|||
public function sqLiteDown(Schema $schema): void
|
||||
{
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE TEMPORARY TABLE __temp__parts AS
|
||||
SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
id_manufacturer,
|
||||
order_orderdetails_id,
|
||||
CREATE TEMPORARY TABLE __temp__parts AS
|
||||
SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
id_manufacturer,
|
||||
order_orderdetails_id,
|
||||
built_project_id,
|
||||
built_assembly_id,
|
||||
datetime_added,
|
||||
name,
|
||||
last_modified,
|
||||
needs_review,
|
||||
tags,
|
||||
mass,
|
||||
description,
|
||||
comment,
|
||||
visible,
|
||||
favorite,
|
||||
minamount,
|
||||
manufacturer_product_url,
|
||||
manufacturer_product_number,
|
||||
manufacturing_status,
|
||||
order_quantity,
|
||||
manual_order,
|
||||
ipn,
|
||||
provider_reference_provider_key,
|
||||
provider_reference_provider_id,
|
||||
provider_reference_provider_url,
|
||||
provider_reference_last_updated,
|
||||
eda_info_reference_prefix,
|
||||
eda_info_value,
|
||||
eda_info_invisible,
|
||||
eda_info_exclude_from_bom,
|
||||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
datetime_added,
|
||||
name,
|
||||
last_modified,
|
||||
needs_review,
|
||||
tags,
|
||||
mass,
|
||||
description,
|
||||
comment,
|
||||
visible,
|
||||
favorite,
|
||||
minamount,
|
||||
manufacturer_product_url,
|
||||
manufacturer_product_number,
|
||||
manufacturing_status,
|
||||
order_quantity,
|
||||
manual_order,
|
||||
ipn,
|
||||
provider_reference_provider_key,
|
||||
provider_reference_provider_id,
|
||||
provider_reference_provider_url,
|
||||
provider_reference_last_updated,
|
||||
eda_info_reference_prefix,
|
||||
eda_info_value,
|
||||
eda_info_invisible,
|
||||
eda_info_exclude_from_bom,
|
||||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint
|
||||
FROM "parts"
|
||||
SQL);
|
||||
|
|
@ -318,132 +318,132 @@ final class Version20250321141740 extends AbstractMultiPlatformMigration
|
|||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
CREATE TABLE "parts" (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
id_preview_attachment INTEGER DEFAULT NULL,
|
||||
id_category INTEGER NOT NULL,
|
||||
id_footprint INTEGER DEFAULT NULL,
|
||||
id_part_unit INTEGER DEFAULT NULL,
|
||||
id_manufacturer INTEGER DEFAULT NULL,
|
||||
order_orderdetails_id INTEGER DEFAULT NULL,
|
||||
built_project_id INTEGER DEFAULT NULL,
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
id_preview_attachment INTEGER DEFAULT NULL,
|
||||
id_category INTEGER NOT NULL,
|
||||
id_footprint INTEGER DEFAULT NULL,
|
||||
id_part_unit INTEGER DEFAULT NULL,
|
||||
id_manufacturer INTEGER DEFAULT NULL,
|
||||
order_orderdetails_id INTEGER DEFAULT NULL,
|
||||
built_project_id INTEGER DEFAULT NULL,
|
||||
built_assembly_id INTEGER DEFAULT NULL,
|
||||
datetime_added DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
last_modified DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
needs_review BOOLEAN NOT NULL,
|
||||
tags CLOB NOT NULL,
|
||||
mass DOUBLE PRECISION DEFAULT NULL,
|
||||
description CLOB NOT NULL,
|
||||
comment CLOB NOT NULL,
|
||||
visible BOOLEAN NOT NULL,
|
||||
favorite BOOLEAN NOT NULL,
|
||||
minamount DOUBLE PRECISION NOT NULL,
|
||||
manufacturer_product_url CLOB NOT NULL,
|
||||
manufacturer_product_number VARCHAR(255) NOT NULL,
|
||||
manufacturing_status VARCHAR(255) DEFAULT NULL,
|
||||
order_quantity INTEGER NOT NULL,
|
||||
manual_order BOOLEAN NOT NULL,
|
||||
ipn VARCHAR(100) DEFAULT NULL,
|
||||
provider_reference_provider_key VARCHAR(255) DEFAULT NULL,
|
||||
provider_reference_provider_id VARCHAR(255) DEFAULT NULL,
|
||||
provider_reference_provider_url VARCHAR(255) DEFAULT NULL,
|
||||
provider_reference_last_updated DATETIME DEFAULT NULL,
|
||||
eda_info_reference_prefix VARCHAR(255) DEFAULT NULL,
|
||||
eda_info_value VARCHAR(255) DEFAULT NULL,
|
||||
eda_info_invisible BOOLEAN DEFAULT NULL,
|
||||
eda_info_exclude_from_bom BOOLEAN DEFAULT NULL,
|
||||
eda_info_exclude_from_board BOOLEAN DEFAULT NULL,
|
||||
eda_info_exclude_from_sim BOOLEAN DEFAULT NULL,
|
||||
eda_info_kicad_symbol VARCHAR(255) DEFAULT NULL,
|
||||
eda_info_kicad_footprint VARCHAR(255) DEFAULT NULL,
|
||||
CONSTRAINT FK_6940A7FEEA7100A1 FOREIGN KEY (id_preview_attachment) REFERENCES "attachments" (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE5697F554 FOREIGN KEY (id_category) REFERENCES "categories" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE7E371A10 FOREIGN KEY (id_footprint) REFERENCES "footprints" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE2626CEF9 FOREIGN KEY (id_part_unit) REFERENCES "measurement_units" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE1ECB93AE FOREIGN KEY (id_manufacturer) REFERENCES "manufacturers" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE81081E9B FOREIGN KEY (order_orderdetails_id) REFERENCES "orderdetails" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
datetime_added DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
last_modified DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
needs_review BOOLEAN NOT NULL,
|
||||
tags CLOB NOT NULL,
|
||||
mass DOUBLE PRECISION DEFAULT NULL,
|
||||
description CLOB NOT NULL,
|
||||
comment CLOB NOT NULL,
|
||||
visible BOOLEAN NOT NULL,
|
||||
favorite BOOLEAN NOT NULL,
|
||||
minamount DOUBLE PRECISION NOT NULL,
|
||||
manufacturer_product_url CLOB NOT NULL,
|
||||
manufacturer_product_number VARCHAR(255) NOT NULL,
|
||||
manufacturing_status VARCHAR(255) DEFAULT NULL,
|
||||
order_quantity INTEGER NOT NULL,
|
||||
manual_order BOOLEAN NOT NULL,
|
||||
ipn VARCHAR(100) DEFAULT NULL,
|
||||
provider_reference_provider_key VARCHAR(255) DEFAULT NULL,
|
||||
provider_reference_provider_id VARCHAR(255) DEFAULT NULL,
|
||||
provider_reference_provider_url VARCHAR(255) DEFAULT NULL,
|
||||
provider_reference_last_updated DATETIME DEFAULT NULL,
|
||||
eda_info_reference_prefix VARCHAR(255) DEFAULT NULL,
|
||||
eda_info_value VARCHAR(255) DEFAULT NULL,
|
||||
eda_info_invisible BOOLEAN DEFAULT NULL,
|
||||
eda_info_exclude_from_bom BOOLEAN DEFAULT NULL,
|
||||
eda_info_exclude_from_board BOOLEAN DEFAULT NULL,
|
||||
eda_info_exclude_from_sim BOOLEAN DEFAULT NULL,
|
||||
eda_info_kicad_symbol VARCHAR(255) DEFAULT NULL,
|
||||
eda_info_kicad_footprint VARCHAR(255) DEFAULT NULL,
|
||||
CONSTRAINT FK_6940A7FEEA7100A1 FOREIGN KEY (id_preview_attachment) REFERENCES "attachments" (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE5697F554 FOREIGN KEY (id_category) REFERENCES "categories" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE7E371A10 FOREIGN KEY (id_footprint) REFERENCES "footprints" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE2626CEF9 FOREIGN KEY (id_part_unit) REFERENCES "measurement_units" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE1ECB93AE FOREIGN KEY (id_manufacturer) REFERENCES "manufacturers" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FE81081E9B FOREIGN KEY (order_orderdetails_id) REFERENCES "orderdetails" (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FEE8AE70D9 FOREIGN KEY (built_project_id) REFERENCES projects (id) NOT DEFERRABLE INITIALLY IMMEDIATE,
|
||||
CONSTRAINT FK_6940A7FECC660B3C FOREIGN KEY (built_assembly_id) REFERENCES assemblies (id) NOT DEFERRABLE INITIALLY IMMEDIATE
|
||||
)
|
||||
SQL);
|
||||
$this->addSql(<<<'SQL'
|
||||
INSERT INTO "parts" (
|
||||
id,
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
id_manufacturer,
|
||||
order_orderdetails_id,
|
||||
built_project_id,
|
||||
built_assembly_id,
|
||||
datetime_added,
|
||||
name,
|
||||
last_modified,
|
||||
needs_review,
|
||||
tags,
|
||||
mass,
|
||||
description,
|
||||
comment,
|
||||
visible,
|
||||
favorite,
|
||||
minamount,
|
||||
manufacturer_product_url,
|
||||
manufacturer_product_number,
|
||||
manufacturing_status,
|
||||
order_quantity,
|
||||
manual_order,
|
||||
ipn,
|
||||
provider_reference_provider_key,
|
||||
provider_reference_provider_id,
|
||||
provider_reference_provider_url,
|
||||
provider_reference_last_updated,
|
||||
eda_info_reference_prefix,
|
||||
eda_info_value,
|
||||
eda_info_invisible,
|
||||
eda_info_exclude_from_bom,
|
||||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint
|
||||
) SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
id_manufacturer,
|
||||
order_orderdetails_id,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
id_manufacturer,
|
||||
order_orderdetails_id,
|
||||
built_project_id,
|
||||
built_assembly_id,
|
||||
datetime_added,
|
||||
name,
|
||||
last_modified,
|
||||
needs_review,
|
||||
tags,
|
||||
mass,
|
||||
description,
|
||||
comment,
|
||||
visible,
|
||||
favorite,
|
||||
minamount,
|
||||
manufacturer_product_url,
|
||||
manufacturer_product_number,
|
||||
manufacturing_status,
|
||||
order_quantity,
|
||||
manual_order,
|
||||
ipn,
|
||||
provider_reference_provider_key,
|
||||
provider_reference_provider_id,
|
||||
provider_reference_provider_url,
|
||||
provider_reference_last_updated,
|
||||
eda_info_reference_prefix,
|
||||
eda_info_value,
|
||||
eda_info_invisible,
|
||||
eda_info_exclude_from_bom,
|
||||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
datetime_added,
|
||||
name,
|
||||
last_modified,
|
||||
needs_review,
|
||||
tags,
|
||||
mass,
|
||||
description,
|
||||
comment,
|
||||
visible,
|
||||
favorite,
|
||||
minamount,
|
||||
manufacturer_product_url,
|
||||
manufacturer_product_number,
|
||||
manufacturing_status,
|
||||
order_quantity,
|
||||
manual_order,
|
||||
ipn,
|
||||
provider_reference_provider_key,
|
||||
provider_reference_provider_id,
|
||||
provider_reference_provider_url,
|
||||
provider_reference_last_updated,
|
||||
eda_info_reference_prefix,
|
||||
eda_info_value,
|
||||
eda_info_invisible,
|
||||
eda_info_exclude_from_bom,
|
||||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint
|
||||
) SELECT
|
||||
id,
|
||||
id_preview_attachment,
|
||||
id_category,
|
||||
id_footprint,
|
||||
id_part_unit,
|
||||
id_manufacturer,
|
||||
order_orderdetails_id,
|
||||
built_project_id,
|
||||
built_assembly_id,
|
||||
datetime_added,
|
||||
name,
|
||||
last_modified,
|
||||
needs_review,
|
||||
tags,
|
||||
mass,
|
||||
description,
|
||||
comment,
|
||||
visible,
|
||||
favorite,
|
||||
minamount,
|
||||
manufacturer_product_url,
|
||||
manufacturer_product_number,
|
||||
manufacturing_status,
|
||||
order_quantity,
|
||||
manual_order,
|
||||
ipn,
|
||||
provider_reference_provider_key,
|
||||
provider_reference_provider_id,
|
||||
provider_reference_provider_url,
|
||||
provider_reference_last_updated,
|
||||
eda_info_reference_prefix,
|
||||
eda_info_value,
|
||||
eda_info_invisible,
|
||||
eda_info_exclude_from_bom,
|
||||
eda_info_exclude_from_board,
|
||||
eda_info_exclude_from_sim,
|
||||
eda_info_kicad_symbol,
|
||||
eda_info_kicad_footprint
|
||||
FROM __temp__parts
|
||||
SQL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue