Language and development rules: Difference between revisions

Jump to navigation Jump to search
Line 130: Line 130:
Those files must be stored into directory '''install/mysql/tables''' for all standard files or '''mymodule/tables''' for tables provided by an external module.
Those files must be stored into directory '''install/mysql/tables''' for all standard files or '''mymodule/tables''' for tables provided by an external module.


Examples
Example '''file of table llx_mytable.sql''':
 
=== File of table llx_mytable.sql ===


<source lang="sql">
<source lang="sql">
Line 149: Line 147:
--
--
-- You should have received a copy of the GNU General Public License
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_mytable.sql,v 1.23 2005/10/08 15:59:49 eldy Exp $
-- ===========================================================================
-- ===========================================================================


Line 166: Line 161:
</source>
</source>


=== File for keys/indexs on llx_mytable.key.sql ===
Example '''file for keys/indexs on llx_mytable.key.sql''':


<source lang="sql">
<source lang="sql">
Line 183: Line 178:
--
--
-- You should have received a copy of the GNU General Public License
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_matable.sql,v 1.23 2005/10/08 15:59:49 eldy Exp $
-- ===========================================================================
-- ===========================================================================


ALTER TABLE llx_matable ADD UNIQUE uk_matable_field(field_one, field_two);
ALTER TABLE llx_matable ADD UNIQUE uk_matable_field(field_one, field_two);

Navigation menu