Welcome Guest, Not a member yet? Register   Sign In
dbforge add field "unique" to disallow duplicate inserts.
#1

[eluser]Unknown[/eluser]
Using mysql it's pretty easy to specify a column as UNIQUE e.g. UNIQUE (column).

How can I do it with dbforge and not fallback to using raw db commands? Am using migration to setup the schema.

Code:
//EMAIL
           "email" => array(
                'type' => 'VARCHAR',
                'constraint' => 45,
                'null' => false
            ),

thanks,
James Tan
#2

[eluser]Harold Villacorte[/eluser]
It looks like the latest version on Github processes a unique index. I have not tested it out. If you decide to try it out I would be interested in knowing how it worked for you.




Theme © iAndrew 2016 - Forum software by © MyBB