Skip to content

Commit

Permalink
Merge pull request #3 from CakeDC/feature/36056
Browse files Browse the repository at this point in the history
REF #36056 add pge digital project to showcase
  • Loading branch information
steinkel authored Nov 27, 2023
2 parents 63480ab + cae881f commit 8cac249
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions config/Migrations/20231124162223_AddPgeDigitalProject.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
declare(strict_types=1);

use Migrations\AbstractMigration;

class AddPgeDigitalProject extends AbstractMigration
{
/**
* up method.
*
* @return void
*/
public function up()
{
$this->table('projects')->insert([
'title' => 'PGE Digital',
'website' => 'https://pge.rj.gov.br',
'slug' => 'pge-digital',
'technologies' => '',
'brief_description' => 'PGE Digital is a complete solution for Brazilian Public Advocacy developed by PGE-RJ',
'description' => '<p><strong>PGE Digital</strong> is a complete solution for Brazilian Public Advocacy developed by PGE-RJ.</p> <p>It provides all the necessary resources for Attorneys to act: from receiving subpoenas to managing deadlines and filing petitions.</p>',
'is_highlighted' => 1,
'is_showcase' => 1,
'created' => date('Y-m-d H:i:s'),
'modified' => date('Y-m-d H:i:s'),
])->save();

$result = $this->fetchRow("SELECT id FROM projects WHERE title like 'PGE Digital'");
$result['id'];

$this->table('uploaded_files')->insert([
'file' => 'pge-digital.png',
'dir' => 'webroot/files/PerspectiveImages/file/1700846962.8208',
'size' => '183957',
'type' => 'image/png',
'created' => date('Y-m-d H:i:s'),
'modified' => date('Y-m-d H:i:s'),
'entity_id' => $result['id'],
'model' => 'PerspectiveImages',
])->save();
$this->table('uploaded_files')->insert([
'file' => 'pge-digital.png',
'dir' => 'webroot/files/ScreenMonitorImages/file/1700846962.8224',
'size' => '183957',
'type' => 'image/png',
'created' => date('Y-m-d H:i:s'),
'modified' => date('Y-m-d H:i:s'),
'entity_id' => $result['id'],
'model' => 'ScreenMonitorImages',
])->save();
}

/**
* down method.
*
* @return void
*/
public function down()
{
$this->query("DELETE FROM uploaded_files WHERE file like 'pge-digital.png'");
$this->query("DELETE FROM projects WHERE title like 'PGE Digital'");
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8cac249

Please sign in to comment.