MySQL Forums
Forum List  »  MySQL Workbench

Re: User datatypes ?????
Posted by: Scott Noyes
Date: July 11, 2008 10:08AM

The MySQL server does not support user datatypes. However, with Workbench, you can create your own data types that are mapped to recognized types within the server.

So, you could create a type called 'brando' with properties 'varchar(255) DEFAULT "stella!"', and then use 'brando' as the datatype in your model. When you export the schema to a .sql file, you'll see the types expanded out to their MySQL equivalents. It's the same concept as using a macro or placeholder in other languages - when you decide that every field of that type should instead have the default value of, "the horror! the horror!", you only have to change it in a single place.

To edit the properties, click on the field and press a key, then start typing. Why the edit field doesn't come up on a double click, I'm not sure - perhaps a bug report or feature request is in the making here...

Options: ReplyQuote


Subject
Views
Written By
Posted
3757
July 10, 2008 09:44PM
Re: User datatypes ?????
2379
July 11, 2008 10:08AM
2205
July 13, 2008 08:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.