added cancellation rules and page
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class CreateBookingclassCancellations extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change(): void
|
||||
{
|
||||
// Storico delle lezioni cancellate dagli allievi.
|
||||
// Nessuna pagina esistente legge questa tabella: non cambia il resto del sistema.
|
||||
$this->table('bookingclass_cancellations', ['id' => 'idcancellation'])
|
||||
->addColumn('idbookingclass', 'integer')
|
||||
->addColumn('idserviceschedule', 'integer', ['null' => true])
|
||||
->addColumn('bookingstart', 'datetime')
|
||||
->addColumn('status', 'string', ['limit' => 30])
|
||||
->addColumn('idservice', 'integer')
|
||||
->addColumn('iduser', 'integer', ['signed' => false])
|
||||
->addColumn('idorder', 'integer', ['null' => true])
|
||||
->addColumn('prevbookingstart', 'datetime', ['null' => true])
|
||||
->addColumn('is_reprogrammed', 'char', ['limit' => 1, 'default' => 'N'])
|
||||
->addColumn('is_gift', 'char', ['limit' => 1, 'default' => 'N'])
|
||||
->addColumn('booking_created_at', 'timestamp', ['null' => true])
|
||||
->addColumn('cancelled_at', 'datetime')
|
||||
->addColumn('cancelled_by', 'integer', ['signed' => false])
|
||||
->addColumn('reprogrammed_incremented', 'char', ['limit' => 1, 'default' => 'N'])
|
||||
->addColumn('idschool', 'integer', ['signed' => false, 'default' => 1])
|
||||
->addIndex(['iduser'])
|
||||
->addIndex(['idorder'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user