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

Model, Entity, Exception & Migration test cases #1943

Merged
merged 22 commits into from
Apr 19, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Changed table structure for forge coverage with all datetime format
  • Loading branch information
atishhamte committed Apr 13, 2019
commit 26e65b85c5000f126522fce3ce1787296d6bfe1e
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ public function up()
'constraint' => 1,
'default' => '0',
],
'created_at' => [
'type' => 'DATETIME',
'null' => true,
],
'updated_at' => [
'type' => 'DATETIME',
'null' => true,
],
]);
$this->forge->addKey('id', true);
$this->forge->createTable('user', true);
Expand Down Expand Up @@ -96,6 +104,14 @@ public function up()
'type' => 'VARCHAR',
'constraint' => 40,
],
'created_at' => [
'type' => 'DATE',
'null' => true,
],
'updated_at' => [
'type' => 'DATE',
'null' => true,
],
]);
$this->forge->addKey('id', true);
$this->forge->createTable('empty', true);
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/Models/EventModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EventModel extends Model

protected $useSoftDeletes = false;

protected $dateFormat = 'int';
protected $dateFormat = 'datetime';

protected $allowedFields = [
'name',
Expand Down
8 changes: 7 additions & 1 deletion tests/_support/Models/UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@ class UserModel extends Model

protected $useSoftDeletes = true;

protected $dateFormat = 'int';
protected $dateFormat = 'datetime';

public $name = '';

public $email = '';

public $country = '';
}