mardi 24 juillet 2018

Is it possible to use sql query in Laravel Migration

I have an create table query as below

> CREATE TABLE ep_student (
>     student_id BIGSERIAL  NOT NULL,
>     stud_name CHARACTER(150)  NOT NULL,
>     no_kp CHARACTER(14)  NOT NULL,
>     dob DATE,
>     birth_place CHARACTER(100),
>     pob_desc CHARACTER(100),
>     dt_enroll DATE,
>     enroll_darjah CHARACTER(20),
>     religion_id CHARACTER(10),
>     ethnic_id CHARACTER(10),
>     citizenship_id CHARACTER(10),
>     warga_desc CHARACTER(100),
>     gender_id CHARACTER(10),
>     autisma_flag CHARACTER(10),
>     lelah_flag CHARACTER(10),
>     heart_flag CHARACTER(10),
>     skin_flag CHARACTER(10),
>     allergy_flag CHARACTER(10),
>     disability_flag CHARACTER(10),
>     disease_desc CHARACTER(100),
>     disability_desc CHARACTER(100),
>     dt_leftschool DATE,
>     reason_leftschool CHARACTER(100),
>     school_id BIGINT  NOT NULL,
>     birth_cert CHARACTER(20),
>     CONSTRAINT PK_ep_student PRIMARY KEY (student_id, no_kp, school_id)

Can I use DB::create in the Laravel Migration file and paste the scheme in it?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire