We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add enum type in table schema. From what I have read enum type can be emulated in oracle,sqlite,mssql with check For mssql
create table sizes ( size varchar(10) NOT NULL CHECK (name IN('small', 'medium', 'large')) )
For sqlite
create table sizes ( size TEXT CHECK( pType IN ('small','medium','large')) )
For oracle
create table sizes ( size VARCHAR2(10) CHECK( name IN ('small','medium','large')) )
For postregres
CREATE TYPE size_enum AS ENUM ('small', 'medium', 'large'); create table sizes ( size size_enum; )
And finally mysql
create table sizes ( size enum('small','medium','large'); )
And php can be something like
$db->schema()->create('size', static function(CreateTable $table) { $table->enum('size, ['small', 'medium', 'large']); });
What do you think?
Cheers,
The text was updated successfully, but these errors were encountered:
I like this idea, but the postgresql examples has two queries. I think that the below example also works for postgresql
create table sizes ( size VARCHAR2(10) CHECK( size IN ('small','medium','large')) )
Sorry, something went wrong.
I am not proficient enough to say will it works. I can test with sqlite3 and mysql.
No branches or pull requests
Please add enum type in table schema.
From what I have read enum type can be emulated in oracle,sqlite,mssql with check
For mssql
For sqlite
For oracle
For postregres
And finally mysql
And php can be something like
What do you think?
Cheers,
The text was updated successfully, but these errors were encountered: