mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-12 21:29:33 +00:00
Merge branch 'Part-DB:master' into Buerklin-provider
This commit is contained in:
commit
25783f1ce0
8 changed files with 67 additions and 70 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
1.16.0
|
||||
1.16.1
|
||||
|
|
|
|||
|
|
@ -201,6 +201,10 @@ You also have to create the database as described above in step 4.
|
|||
You can run the console commands described in README by
|
||||
executing `docker exec --user=www-data -it partdb bin/console [command]`
|
||||
|
||||
{: .warning }
|
||||
> If you run a root console inside the container, and wanna execute commands on the webserver behalf, be sure to use `sudo -E` command (with the `-E` flag) to preserve env variables from the current shell.
|
||||
> Otherwise Part-DB console might use the wrong configuration to execute commands.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
*Login is not possible. Login page is just reloading and no error message is shown or something like "CSFR token invalid"*:
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ is named `partdb`, you can execute the command `php bin/console cache:clear` wit
|
|||
docker exec --user=www-data partdb php bin/console cache:clear
|
||||
```
|
||||
|
||||
{: .warning }
|
||||
> If you run a root console inside the docker container, and wanna execute commands on the webserver behalf, be sure to use `sudo -E` command (with the `-E` flag) to preserve env variables from the current shell.
|
||||
> Otherwise Part-DB console might use the wrong configuration to execute commands.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
## User management commands
|
||||
|
||||
* `php bin/console partdb:users:list`: List all users of this Part-DB instance
|
||||
|
|
@ -64,4 +70,4 @@ docker exec --user=www-data partdb php bin/console cache:clear
|
|||
## Database commands
|
||||
|
||||
* `php bin/console doctrine:migrations:migrate`: Migrate the database to the latest version
|
||||
* `php bin/console doctrine:migrations:up-to-date`: Check if the database is up-to-date
|
||||
* `php bin/console doctrine:migrations:up-to-date`: Check if the database is up-to-date
|
||||
|
|
|
|||
|
|
@ -4,20 +4,21 @@ declare(strict_types=1);
|
|||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use App\Migration\AbstractMultiPlatformMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20250220215048 extends AbstractMultiPlatformMigration
|
||||
final class Version20250220215048 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Split $path property for attachments into $internal_path and $external_path';
|
||||
}
|
||||
|
||||
public function mySQLUp(Schema $schema): void
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
//Create the new columns as nullable (that is easier modifying them)
|
||||
$this->addSql('ALTER TABLE attachments ADD internal_path VARCHAR(255) DEFAULT NULL, ADD external_path VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attachments ADD internal_path VARCHAR(255) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE attachments ADD external_path VARCHAR(255) DEFAULT NULL');
|
||||
|
||||
//Copy the data from path to external_path and remove the path column
|
||||
$this->addSql('UPDATE attachments SET external_path=path');
|
||||
|
|
@ -32,52 +33,10 @@ final class Version20250220215048 extends AbstractMultiPlatformMigration
|
|||
$this->addSql('UPDATE attachments SET external_path=NULL WHERE internal_path IS NOT NULL');
|
||||
}
|
||||
|
||||
public function mySQLDown(Schema $schema): void
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('UPDATE attachments SET external_path=internal_path WHERE internal_path IS NOT NULL');
|
||||
$this->addSql('ALTER TABLE attachments DROP internal_path');
|
||||
$this->addSql('ALTER TABLE attachments RENAME COLUMN external_path TO path');
|
||||
}
|
||||
|
||||
public function postgreSQLUp(Schema $schema): void
|
||||
{
|
||||
//We can use the same SQL for PostgreSQL as for MySQL
|
||||
$this->mySQLUp($schema);
|
||||
}
|
||||
|
||||
public function postgreSQLDown(Schema $schema): void
|
||||
{
|
||||
//We can use the same SQL for PostgreSQL as for MySQL
|
||||
$this->mySQLDown($schema);
|
||||
}
|
||||
|
||||
public function sqLiteUp(Schema $schema): void
|
||||
{
|
||||
$this->addSql('CREATE TEMPORARY TABLE __temp__attachments AS SELECT id, type_id, original_filename, show_in_table, name, last_modified, datetime_added, class_name, element_id, path FROM attachments');
|
||||
$this->addSql('DROP TABLE attachments');
|
||||
$this->addSql('CREATE TABLE attachments (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, type_id INTEGER NOT NULL, original_filename VARCHAR(255) DEFAULT NULL, show_in_table BOOLEAN NOT NULL, name VARCHAR(255) NOT NULL, last_modified DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, datetime_added DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, class_name VARCHAR(255) NOT NULL, element_id INTEGER NOT NULL, internal_path VARCHAR(255) DEFAULT NULL, external_path VARCHAR(255) DEFAULT NULL, CONSTRAINT FK_47C4FAD6C54C8C93 FOREIGN KEY (type_id) REFERENCES attachment_types (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE)');
|
||||
$this->addSql('INSERT INTO attachments (id, type_id, original_filename, show_in_table, name, last_modified, datetime_added, class_name, element_id, external_path) SELECT id, type_id, original_filename, show_in_table, name, last_modified, datetime_added, class_name, element_id, path FROM __temp__attachments');
|
||||
$this->addSql('DROP TABLE __temp__attachments');
|
||||
$this->addSql('CREATE INDEX attachment_element_idx ON attachments (class_name, element_id)');
|
||||
$this->addSql('CREATE INDEX attachment_name_idx ON attachments (name)');
|
||||
$this->addSql('CREATE INDEX attachments_idx_class_name_id ON attachments (class_name, id)');
|
||||
$this->addSql('CREATE INDEX attachments_idx_id_element_id_class_name ON attachments (id, element_id, class_name)');
|
||||
$this->addSql('CREATE INDEX IDX_47C4FAD6C54C8C93 ON attachments (type_id)');
|
||||
$this->addSql('CREATE INDEX IDX_47C4FAD61F1F2A24 ON attachments (element_id)');
|
||||
|
||||
$this->addSql('UPDATE attachments SET internal_path=external_path WHERE external_path LIKE \'#%MEDIA#%%\' ESCAPE \'#\'');
|
||||
$this->addSql('UPDATE attachments SET internal_path=external_path WHERE external_path LIKE \'#%BASE#%%\' ESCAPE \'#\'');
|
||||
$this->addSql('UPDATE attachments SET internal_path=external_path WHERE external_path LIKE \'#%SECURE#%%\' ESCAPE \'#\'');
|
||||
$this->addSql('UPDATE attachments SET internal_path=external_path WHERE external_path LIKE \'#%FOOTPRINTS#%%\' ESCAPE \'#\'');
|
||||
$this->addSql('UPDATE attachments SET internal_path=external_path WHERE external_path LIKE \'#%FOOTPRINTS3D#%%\' ESCAPE \'#\'');
|
||||
$this->addSql('UPDATE attachments SET external_path=NULL WHERE internal_path IS NOT NULL');
|
||||
}
|
||||
|
||||
public function sqLiteDown(Schema $schema): void
|
||||
{
|
||||
//Reuse the MySQL down migration:
|
||||
$this->mySQLDown($schema);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class LCSCProvider implements InfoProviderInterface
|
|||
'Cookie' => new Cookie('currencyCode', $this->currency)
|
||||
],
|
||||
'query' => [
|
||||
'prductCode' => $id,
|
||||
'productCode' => $id,
|
||||
],
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -9304,7 +9304,7 @@ Element 3</target>
|
|||
<unit id="oQmnwDq" name="part.filter.orderdetails_count">
|
||||
<segment state="translated">
|
||||
<source>part.filter.orderdetails_count</source>
|
||||
<target>Number of orderdetails</target>
|
||||
<target>Number of order details</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="EVZFWzr" name="part.filter.lotExpirationDate">
|
||||
|
|
|
|||
|
|
@ -780,18 +780,10 @@ L'utente dovrà configurare nuovamente tutti i metodi di autenticazione a due fa
|
|||
<target>Eliminare</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="W80Gv6o" name="attachment.external">
|
||||
<notes>
|
||||
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\_attachments.html.twig:41</note>
|
||||
<note category="file-source" priority="1">Part-DB1\templates\Parts\edit\_attachments.html.twig:38</note>
|
||||
<note category="file-source" priority="1">Part-DB1\templates\Parts\info\_attachments_info.html.twig:35</note>
|
||||
<note category="file-source" priority="1">Part-DB1\src\DataTables\AttachmentDataTable.php:159</note>
|
||||
<note priority="1">Part-DB1\templates\Parts\edit\_attachments.html.twig:38</note>
|
||||
<note priority="1">Part-DB1\src\DataTables\AttachmentDataTable.php:159</note>
|
||||
</notes>
|
||||
<unit id="FtktoBj" name="attachment.external_only">
|
||||
<segment state="translated">
|
||||
<source>attachment.external</source>
|
||||
<target>Esterno</target>
|
||||
<source>attachment.external_only</source>
|
||||
<target>Solo allegato esterno</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="JES0hrm" name="attachment.preview.alt">
|
||||
|
|
@ -806,7 +798,7 @@ L'utente dovrà configurare nuovamente tutti i metodi di autenticazione a due fa
|
|||
<target>Miniatura dell'allegato</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="fCQby7u" name="attachment.view">
|
||||
<unit id="I_HDnsL" name="attachment.view_local">
|
||||
<notes>
|
||||
<note category="file-source" priority="1">Part-DB1\templates\AdminPages\_attachments.html.twig:52</note>
|
||||
<note category="file-source" priority="1">Part-DB1\templates\Parts\edit\_attachments.html.twig:50</note>
|
||||
|
|
@ -816,8 +808,8 @@ L'utente dovrà configurare nuovamente tutti i metodi di autenticazione a due fa
|
|||
<note priority="1">Part-DB1\templates\Parts\info\_attachments_info.html.twig:45</note>
|
||||
</notes>
|
||||
<segment state="translated">
|
||||
<source>attachment.view</source>
|
||||
<target>Visualizzare</target>
|
||||
<source>attachment.view_local</source>
|
||||
<target>Visualizza la copia locale</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="mEHEYM6" name="attachment.file_not_found">
|
||||
|
|
@ -2119,14 +2111,14 @@ I sub elementi saranno spostati verso l'alto.</target>
|
|||
<target>Immagine di anteprima</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="O2kBcDz" name="attachment.download">
|
||||
<unit id="Uuy6Ntl" name="attachment.download_local">
|
||||
<notes>
|
||||
<note category="file-source" priority="1">Part-DB1\templates\Parts\info\_attachments_info.html.twig:67</note>
|
||||
<note priority="1">Part-DB1\templates\Parts\info\_attachments_info.html.twig:50</note>
|
||||
</notes>
|
||||
<segment state="translated">
|
||||
<source>attachment.download</source>
|
||||
<target>Download</target>
|
||||
<source>attachment.download_local</source>
|
||||
<target>Scarica la copia in locale</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="mPK9Iyq" name="user.creating_user">
|
||||
|
|
@ -12324,5 +12316,35 @@ Notare che non è possibile impersonare un utente disattivato. Quando si prova a
|
|||
<target>Profilo salvato!</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="8C9ijHM" name="entity.export.flash.error.no_entities">
|
||||
<segment state="translated">
|
||||
<source>entity.export.flash.error.no_entities</source>
|
||||
<target>Non ci sono entità da esportare!</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="0B3_rob" name="attachment.table.internal_file">
|
||||
<segment state="translated">
|
||||
<source>attachment.table.internal_file</source>
|
||||
<target>File interno</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="uhfLnkB" name="attachment.table.external_link">
|
||||
<segment state="translated">
|
||||
<source>attachment.table.external_link</source>
|
||||
<target>Link esterno</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="2WKNZAm" name="attachment.view_external.view_at">
|
||||
<segment state="translated">
|
||||
<source>attachment.view_external.view_at</source>
|
||||
<target>Visualizza da %host%</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="nwO78O_" name="attachment.view_external">
|
||||
<segment state="translated">
|
||||
<source>attachment.view_external</source>
|
||||
<target>Visualizza la versione esterna</target>
|
||||
</segment>
|
||||
</unit>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="zh-CN">
|
||||
<file id="security.en">
|
||||
<unit id="aazoCks" name="user.login_error.user_disabled">
|
||||
<unit id="GrLNa9P" name="user.login_error.user_disabled">
|
||||
<segment state="translated">
|
||||
<source>user.login_error.user_disabled</source>
|
||||
<target>账户已被禁用。请联系管理员</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="Dpb9AmY" name="saml.error.cannot_login_local_user_per_saml">
|
||||
<unit id="IFQ5XrG" name="saml.error.cannot_login_local_user_per_saml">
|
||||
<segment state="translated">
|
||||
<source>saml.error.cannot_login_local_user_per_saml</source>
|
||||
<target>无法通过 SSO 以本地用户身份登录。请使用本地用户密码</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="wOYPZmb" name="saml.error.cannot_login_saml_user_locally">
|
||||
<segment state="translated">
|
||||
<source>saml.error.cannot_login_saml_user_locally</source>
|
||||
<target>无法使用本地身份验证器以SAML用户身份登录!请改用SSO登录</target>
|
||||
</segment>
|
||||
</unit>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue