yajra / pdo-via-oci8

PHP PDO_OCI functions via OCI8 extension
Other
88 stars 61 forks source link

Change PDO::PARAM_NULL to resolve to SQLT_CHR #6

Closed AdamWillden closed 10 years ago

AdamWillden commented 10 years ago

When inserting NULLs for columns on & off in the definition below the value entered was a string of "0"

schema::create('on_off_messages', function (Blueprint $table) {
    $table->increments('id', 'device_status_bits_pk');
    $table->string('on', 64)->nullable();
    $table->string('off', 64)->nullable();
});

This change allows NULLs to be entered. It appears that NULLs are still entered into integer fields correctly too, though I would advise this is tested in your environment too!