Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
creating unique field in table
nikola_1988
February 2014
\DBUtil::create_table();
how to set one of the table fields to be unique...is there a parameter when adding fields or i have to use \DBUtil::create_index(), and if i have to use ::create_index(), do i have to make the field 1st in create_table()?
Harro
February 2014
Accepted Answer
You mean a UNIQUE INDEX on a non-primary key? Because primary keys are unique by default.
If you need additional indexes, you need to use create_index().
nikola_1988
February 2014
yes thats what i mean...thank you
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
February 2014
nikola_1988
February 2014