Skip to content
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

mariadb migration create test #3

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ php:
- 7.1

addons:
mariadb: '10.3'
mariadb: '10.2'

before_script:
- mysql -e 'CREATE DATABASE test;'
Expand All @@ -15,14 +15,19 @@ before_script:
script:
- php bin/console doctrine:database:drop -n --force
- php bin/console doctrine:database:create -n
- php bin/console doctrine:migrations:migrate -n
- php bin/console doctrine:schema:create -n
- php bin/console doctrine:schema:update --dump-sql
- php bin/console doctrine:schema:validate -n
- rm src/Entity/Admin.php
- mv AdminEdited.php src/Entity/Admin.php
- php bin/console doctrine:migrations:diff -n
- php bin/console doctrine:migrations:migrate -n
- php bin/console doctrine:schema:validate -n

cache:
directories:
- $COMPOSER_CACHE_DIR

notifications:
email:
- bukashk0zzz@gmail.com
- bukashk0zzz@gmail.com
133 changes: 133 additions & 0 deletions AdminEdited.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?php declare(strict_types = 1);

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
* Admin
*
* @ORM\Table(name="admins")
* @ORM\Entity()
*/
class Admin
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned": true})
* @ORM\Id()
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;

/**
* @var string
*
* @ORM\Column(name="login", type="string", length=255, nullable=true)
*/
private $login;

/**
* @var string
*
* @ORM\Column(name="password", type="string", length=255, nullable=true)
*/
private $password;

/**
* @var string
*
* @ORM\Column(name="about", type="string", length=255, nullable=true)
*/
private $about;

/**
* @var bool
*
* @ORM\Column(name="status", type="boolean", nullable=false, options={"default" : "1"})
*/
private $status = true;

/**
* Get id
*
* @return int
*/
public function getId(): int
{
return $this->id;
}

/**
* Set login
*
* @param string $login
*
* @return Admin
*/
public function setLogin(string $login): Admin
{
$this->login = $login;

return $this;
}

/**
* Get login
*
* @return string
*/
public function getLogin(): string
{
return $this->login;
}

/**
* Set password
*
* @param string $password
*
* @return Admin
*/
public function setPassword(string $password): Admin
{
$this->password = $password;

return $this;
}

/**
* Get password
*
* @return string
*/
public function getPassword(): string
{
return $this->password;
}

/**
* Set status
*
* @param bool $status
*
* @return Admin
*/
public function setStatus(bool $status): Admin
{
$this->status = $status;

return $this;
}

/**
* Get status
*
* @return bool
*/
public function getStatus(): bool
{
return $this->status;
}
}
28 changes: 0 additions & 28 deletions src/Migrations/Version20171204125843.php

This file was deleted.