Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 956DD10B4B for ; Thu, 1 Aug 2013 18:13:12 +0000 (UTC) Received: (qmail 5776 invoked by uid 500); 1 Aug 2013 18:13:11 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 5739 invoked by uid 500); 1 Aug 2013 18:13:11 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 5728 invoked by uid 99); 1 Aug 2013 18:13:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 18:13:11 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [109.72.87.138] (HELO smtp02.mail.pcextreme.nl) (109.72.87.138) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 18:13:06 +0000 Received: from [IPv6:2a00:f10:11c:ab:29f1:d68c:618a:c045] (unknown [IPv6:2a00:f10:11c:ab:29f1:d68c:618a:c045]) by smtp02.mail.pcextreme.nl (Postfix) with ESMTPA id 0ED0A3FC9D for ; Thu, 1 Aug 2013 20:12:23 +0200 (CEST) Message-ID: <51FAA507.2010501@widodh.nl> Date: Thu, 01 Aug 2013 20:12:23 +0200 From: Wido den Hollander User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: dev@cloudstack.apache.org Subject: Do we allow ENUM database types? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm working on a disk cache setting for per disk offering which allows users to set it to: - none (current behaviour and default) - writeback - writethrough I've done some work in the disk-cache branch [0] where I created a new column called "cache_mode" in the disk_offering table. It's currently a varchar(32), but only 3 strings are allowed in the column, as listed above. We don't use enums anywhere in the database, so I was wondering if there is a good reason for that? Otherwise I think using a enum here would be a good use-case. Wido [0]: https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=shortlog;h=refs/heads/disk-cache