Browse Source

Cast to boolean all the int(1) declared in the DB

pull/392/head
Timothée Jaussoin 9 years ago
parent
commit
8d9490f68d
  1. 4
      app/models/conference/Conference.php
  2. 2
      app/models/config/Config.php
  3. 6
      app/models/message/Message.php
  4. 2
      app/models/postn/Postn.php
  5. 2
      app/models/presence/Presence.php
  6. 2
      app/models/subscription/Subscription.php
  7. 2
      composer.json
  8. 10
      composer.lock

4
app/models/conference/Conference.php

@ -18,7 +18,7 @@ class Conference extends Model
'conference' => ['type' => 'string','size' => 128,'key' => true],
'name' => ['type' => 'string','size' => 128,'mandatory' => true],
'nick' => ['type' => 'string','size' => 128],
'autojoin' => ['type' => 'int','size' => 1],
'status' => ['type' => 'int','size' => 1],
'autojoin' => ['type' => 'bool'],
'status' => ['type' => 'bool'],
];
}

2
app/models/config/Config.php

@ -29,7 +29,7 @@ class Config extends Model
'loglevel' => ['type' => 'string','size' => 16,'mandatory' => true],
'timezone' => ['type' => 'string','size' => 32,'mandatory' => true],
'info' => ['type' => 'text'],
'unregister' => ['type' => 'int','size' => 1],
'unregister' => ['type' => 'bool'],
'username' => ['type' => 'string','size' => 32,'mandatory' => true],
'password' => ['type' => 'string','size' => 64,'mandatory' => true],
'sizelimit' => ['type' => 'int','size' => 16],

6
app/models/message/Message.php

@ -56,11 +56,11 @@ class Message extends Model
'published' => ['type' => 'date','mandatory' => true],
'delivered' => ['type' => 'date'],
'displayed' => ['type' => 'date'],
'markable' => ['type' => 'int','size' => 1],
'edited' => ['type' => 'int','size' => 1],
'markable' => ['type' => 'bool'],
'edited' => ['type' => 'bool'],
'picture' => ['type' => 'text'],
'sticker' => ['type' => 'string','size' => 128],
'quoted' => ['type' => 'int','size' => 1],
'quoted' => ['type' => 'bool'],
'file' => ['type' => 'serialized']
];

2
app/models/postn/Postn.php

@ -71,7 +71,7 @@ class Postn extends Model
'links' => ['type' => 'serialized'],
'picture' => ['type' => 'text'],
'hash' => ['type' => 'string','size' => 128,'mandatory' => true],
'nsfw' => ['type' => 'int','size' => 1]
'nsfw' => ['type' => 'bool']
];
public function __construct()

2
app/models/presence/Presence.php

@ -51,7 +51,7 @@ class Presence extends Model
'delay' => ['type' => 'date'],
'last' => ['type' => 'int', 'size' => 11],
'publickey' => ['type' => 'text'],
'muc' => ['type' => 'int', 'size' => 1],
'muc' => ['type' => 'bool'],
'mucjid' => ['type' => 'string', 'size' => 64],
'mucaffiliation' => ['type' => 'string','size' => 32],
'mucrole' => ['type' => 'string', 'size' => 32],

2
app/models/subscription/Subscription.php

@ -27,7 +27,7 @@ class Subscription extends Model
'subid' => ['type' => 'string', 'size' => 128],
'title' => ['type' => 'string', 'size' => 128],
'tags' => ['type' => 'serialized'],
'timestamp' => ['type' => 'date',]
'timestamp' => ['type' => 'date']
];
public function getLogo()

2
composer.json

@ -15,7 +15,7 @@
"rain/raintpl": "dev-master",
"michelf/php-markdown": "1.7.0",
"movim/modl": "dev-master#77a0d357b939bb7000ed9b590b04a82d04d14c06",
"movim/modl": "dev-master#5863813c917d302bd31781965bbd8cbe693d30ae",
"movim/sasl2": "dev-master",
"movim/moxl": "dev-master#7315c1362c6a049e33cdd6a02ed9dfbefa6a2ca0",

10
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "9ec0e8c948868b6a401a421fcde86e86",
"content-hash": "a7cedf93fbfa109524f2ca60a6efc250",
"packages": [
{
"name": "cboden/ratchet",
@ -728,12 +728,12 @@
"source": {
"type": "git",
"url": "https://github.com/movim/modl.git",
"reference": "77a0d357b939bb7000ed9b590b04a82d04d14c06"
"reference": "5863813c917d302bd31781965bbd8cbe693d30ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/movim/modl/zipball/77a0d357b939bb7000ed9b590b04a82d04d14c06",
"reference": "77a0d357b939bb7000ed9b590b04a82d04d14c06",
"url": "https://api.github.com/repos/movim/modl/zipball/5863813c917d302bd31781965bbd8cbe693d30ae",
"reference": "5863813c917d302bd31781965bbd8cbe693d30ae",
"shasum": ""
},
"require": {
@ -764,7 +764,7 @@
"database",
"sql"
],
"time": "2017-02-26 08:51:12"
"time": "2017-05-10 06:50:59"
},
{
"name": "movim/moxl",

Loading…
Cancel
Save