-
Notifications
You must be signed in to change notification settings - Fork 529
Migration: Check schema differences post-migration - refs BT#20968 #5720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1e7fc15
a404f43
5fc6211
0279752
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /* For licensing terms, see /license.txt */ | ||
|
|
||
| namespace Chamilo\CoreBundle\Entity; | ||
|
|
||
| use Chamilo\CoreBundle\Traits\UserTrait; | ||
| use Doctrine\ORM\Mapping as ORM; | ||
|
|
||
| /** | ||
| * Block entity. | ||
| */ | ||
| #[ORM\Table(name: 'block')] | ||
| #[ORM\Entity] | ||
| class Block | ||
| { | ||
| use UserTrait; | ||
|
|
||
| #[ORM\Column(name: 'id', type: 'integer')] | ||
| #[ORM\Id] | ||
| #[ORM\GeneratedValue(strategy: 'IDENTITY')] | ||
| protected ?int $id = null; | ||
|
|
||
| #[ORM\Column(name: 'title', type: 'string', length: 255, nullable: true)] | ||
| protected ?string $title = null; | ||
|
|
||
| #[ORM\Column(name: 'description', type: 'text', nullable: true)] | ||
| protected ?string $description = null; | ||
|
|
||
| #[ORM\Column(name: 'path', type: 'string', length: 190, nullable: false)] | ||
| protected string $path; | ||
|
|
||
| #[ORM\Column(name: 'controller', type: 'string', length: 100, nullable: false)] | ||
| protected string $controller; | ||
|
|
||
| #[ORM\Column(name: 'active', type: 'boolean', nullable: false)] | ||
| protected bool $active; | ||
|
|
||
| #[ORM\OneToOne(inversedBy: 'block', targetEntity: User::class)] | ||
| #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] | ||
| protected User $user; | ||
|
|
||
| /** | ||
| * Get id. | ||
| */ | ||
| public function getId(): ?int | ||
| { | ||
| return $this->id; | ||
| } | ||
|
|
||
| public function getTitle(): ?string | ||
| { | ||
| return $this->title; | ||
| } | ||
|
|
||
| public function setTitle(?string $title): self | ||
| { | ||
| $this->title = $title; | ||
| return $this; | ||
| } | ||
|
|
||
| public function getDescription(): ?string | ||
| { | ||
| return $this->description; | ||
| } | ||
|
|
||
| public function setDescription(?string $description): self | ||
| { | ||
| $this->description = $description; | ||
| return $this; | ||
| } | ||
|
|
||
| public function getPath(): string | ||
| { | ||
| return $this->path; | ||
| } | ||
|
|
||
| public function setPath(string $path): self | ||
| { | ||
| $this->path = $path; | ||
| return $this; | ||
| } | ||
|
|
||
| public function getController(): string | ||
| { | ||
| return $this->controller; | ||
| } | ||
|
|
||
| public function setController(string $controller): self | ||
| { | ||
| $this->controller = $controller; | ||
| return $this; | ||
| } | ||
|
|
||
| public function isActive(): bool | ||
| { | ||
| return $this->active; | ||
| } | ||
|
|
||
| public function setActive(bool $active): self | ||
| { | ||
| $this->active = $active; | ||
| return $this; | ||
| } | ||
|
|
||
| public function getUser(): User | ||
| { | ||
| return $this->user; | ||
| } | ||
|
|
||
| public function setUser(User $user): self | ||
| { | ||
| $this->user = $user; | ||
| return $this; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /* For licensing terms, see /license.txt */ | ||
|
|
||
| namespace Chamilo\CoreBundle\Entity; | ||
|
|
||
| use Doctrine\ORM\Mapping as ORM; | ||
|
|
||
| #[ORM\Entity] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. |
||
| #[ORM\Table(name: 'justification_document')] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. |
||
| class JustificationDocument | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You must use "/**" style comments for a class comment |
||
| { | ||
| #[ORM\Id] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead. |
||
| #[ORM\GeneratedValue(strategy: 'AUTO')] | ||
| #[ORM\Column(type: 'integer')] | ||
| private ?int $id = null; | ||
|
|
||
| #[ORM\Column(type: 'text', nullable: true)] | ||
| private ?string $code = null; | ||
|
|
||
| #[ORM\Column(type: 'text', nullable: true)] | ||
| private ?string $name = null; | ||
|
|
||
| #[ORM\Column(type: 'integer', nullable: true)] | ||
| private ?int $validityDuration = null; | ||
|
|
||
| #[ORM\Column(type: 'text', nullable: true)] | ||
| private ?string $comment = null; | ||
|
|
||
| #[ORM\Column(type: 'integer', nullable: true)] | ||
| private ?int $dateManualOn = null; | ||
|
|
||
| public function getId(): ?int | ||
| { | ||
| return $this->id; | ||
| } | ||
|
|
||
| public function getCode(): ?string | ||
| { | ||
| return $this->code; | ||
| } | ||
|
|
||
| public function setCode(?string $code): self | ||
| { | ||
| $this->code = $code; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getName(): ?string | ||
| { | ||
| return $this->name; | ||
| } | ||
|
|
||
| public function setName(?string $name): self | ||
| { | ||
| $this->name = $name; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getValidityDuration(): ?int | ||
| { | ||
| return $this->validityDuration; | ||
| } | ||
|
|
||
| public function setValidityDuration(?int $validityDuration): self | ||
| { | ||
| $this->validityDuration = $validityDuration; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getComment(): ?string | ||
| { | ||
| return $this->comment; | ||
| } | ||
|
|
||
| public function setComment(?string $comment): self | ||
| { | ||
| $this->comment = $comment; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getDateManualOn(): ?int | ||
| { | ||
| return $this->dateManualOn; | ||
| } | ||
|
|
||
| public function setDateManualOn(?int $dateManualOn): self | ||
| { | ||
| $this->dateManualOn = $dateManualOn; | ||
|
|
||
| return $this; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /* For licensing terms, see /license.txt */ | ||
|
|
||
| namespace Chamilo\CoreBundle\Entity; | ||
|
|
||
| use Doctrine\ORM\Mapping as ORM; | ||
|
|
||
| #[ORM\Entity] | ||
| #[ORM\Table(name: 'justification_document_rel_users')] | ||
| class JustificationDocumentRelUsers | ||
| { | ||
| #[ORM\Id] | ||
| #[ORM\GeneratedValue(strategy: 'AUTO')] | ||
| #[ORM\Column(type: 'integer')] | ||
| private ?int $id = null; | ||
|
|
||
| #[ORM\ManyToOne(targetEntity: JustificationDocument::class)] | ||
| #[ORM\JoinColumn(name: 'justification_document_id', referencedColumnName: 'id', onDelete: 'CASCADE')] | ||
| private JustificationDocument $justificationDocument; | ||
|
|
||
| #[ORM\Column(type: 'string', length: 255, nullable: true)] | ||
| private ?string $filePath = null; | ||
|
|
||
| #[ORM\ManyToOne(targetEntity: User::class)] | ||
| #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] | ||
| private ?User $user = null; | ||
|
|
||
| #[ORM\Column(type: 'date', nullable: true)] | ||
| private ?\DateTime $dateValidity = null; | ||
|
|
||
| public function getId(): ?int | ||
| { | ||
| return $this->id; | ||
| } | ||
|
|
||
| public function getJustificationDocument(): JustificationDocument | ||
| { | ||
| return $this->justificationDocument; | ||
| } | ||
|
|
||
| public function setJustificationDocument(JustificationDocument $justificationDocument): self | ||
| { | ||
| $this->justificationDocument = $justificationDocument; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getFilePath(): ?string | ||
| { | ||
| return $this->filePath; | ||
| } | ||
|
|
||
| public function setFilePath(?string $filePath): self | ||
| { | ||
| $this->filePath = $filePath; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getUser(): ?User | ||
| { | ||
| return $this->user; | ||
| } | ||
|
|
||
| public function setUser(?User $user): self | ||
| { | ||
| $this->user = $user; | ||
|
|
||
| return $this; | ||
| } | ||
|
|
||
| public function getDateValidity(): ?\DateTime | ||
| { | ||
| return $this->dateValidity; | ||
| } | ||
|
|
||
| public function setDateValidity(?\DateTime $dateValidity): self | ||
| { | ||
| $this->dateValidity = $dateValidity; | ||
|
|
||
| return $this; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a single space around assignment operators