Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
webresetter-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
webresetter-frontend
Commits
ed6a940e
Verified
Commit
ed6a940e
authored
2 years ago
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
add name field to user
parent
2c6fd219
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
migrations/Version20221125085936.php
+31
-0
31 additions, 0 deletions
migrations/Version20221125085936.php
src/Entity/Users.php
+15
-0
15 additions, 0 deletions
src/Entity/Users.php
with
46 additions
and
0 deletions
migrations/Version20221125085936.php
0 → 100644
+
31
−
0
View file @
ed6a940e
<?php
declare
(
strict_types
=
1
);
namespace
DoctrineMigrations
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\Migrations\AbstractMigration
;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final
class
Version20221125085936
extends
AbstractMigration
{
public
function
getDescription
():
string
{
return
''
;
}
public
function
up
(
Schema
$schema
):
void
{
// this up() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE users ADD name VARCHAR(255) DEFAULT NULL'
);
}
public
function
down
(
Schema
$schema
):
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE users DROP name'
);
}
}
This diff is collapsed.
Click to expand it.
src/Entity/Users.php
+
15
−
0
View file @
ed6a940e
...
@@ -29,6 +29,9 @@ class Users implements UserInterface, PasswordAuthenticatedUserInterface
...
@@ -29,6 +29,9 @@ class Users implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\ManyToMany(targetEntity: WebResetter::class, inversedBy: 'users')]
#[ORM\ManyToMany(targetEntity: WebResetter::class, inversedBy: 'users')]
private
Collection
$webResetter
;
private
Collection
$webResetter
;
#[ORM\Column(length: 255, nullable: true)]
private
?string
$name
=
null
;
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
webResetter
=
new
ArrayCollection
();
$this
->
webResetter
=
new
ArrayCollection
();
...
@@ -116,4 +119,16 @@ class Users implements UserInterface, PasswordAuthenticatedUserInterface
...
@@ -116,4 +119,16 @@ class Users implements UserInterface, PasswordAuthenticatedUserInterface
return
$this
;
return
$this
;
}
}
public
function
getName
():
?string
{
return
$this
->
name
;
}
public
function
setName
(
?string
$name
):
self
{
$this
->
name
=
$name
;
return
$this
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment