[lms-dev] [lms-commits] CVS update of lms/lib/upgradedb (mysql.2009103000.php)

Grzegorz Chwesewicz grzegorz.chwesewicz w retis.net.pl
Sob, 31 Paź 2009, 09:38:41 CET


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

LMS CVS pisze:
> Date: Friday, October 30, 2009 @ 21:37:38
> Author: webvisor
> Path: /cvsroot/lms/lib/upgradedb
>
>    Added: mysql.2009103000.php
>
> added powerdns support (Dariusz Kowalczyk/Jan Gancarczyk)
>
>
> Diff URLs:
> http://cvs.lms.org.pl/viewvc/lms/lib/upgradedb/mysql.2009103000.php?rev=1.1
>
>
> Index: lms/lib/upgradedb/mysql.2009103000.php
> diff -u /dev/null lms/lib/upgradedb/mysql.2009103000.php:1.1
> --- /dev/null	Fri Oct 30 21:37:38 2009
> +++ lms/lib/upgradedb/mysql.2009103000.php	Fri Oct 30 21:37:38 2009
> @@ -0,0 +1,61 @@
> +<?php
> +
> +/*
> + * LMS version 1.11-cvs
> + *
> + *  (C) Copyright 2009 Webvisor Sp. z o.o.
> + *
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License Version 2 as
> + *  published by the Free Software Foundation.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License
> + *  along with this program; if not, write to the Free Software
> + *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> + *  USA.
> + *
> + */
> +
> +
> +$DB->Execute("alter table domains add master VARCHAR(128) DEFAULT NULL");
> +$DB->Execute("alter table domains add last_check INT DEFAULT NULL");
> +$DB->Execute("alter table domains add type    VARCHAR(6) NOT NULL");
> +$DB->Execute("alter table domains add notified_serial INT DEFAULT NULL");
> +$DB->Execute("alter table domains add account VARCHAR(40) DEFAULT NULL");
> +$DB->Execute("alter table domains engine=innodb");
> +
> +
> +$DB->Execute("CREATE UNIQUE INDEX name_index ON domains(name)");
> +
> +$DB->Execute("CREATE TABLE records (
> +  id              INT auto_increment,
> +  domain_id       INT DEFAULT NULL,
> +  name            VARCHAR(255) DEFAULT NULL,
> +  type            VARCHAR(6) DEFAULT NULL,
> +  content         VARCHAR(255) DEFAULT NULL,
> +  ttl             INT DEFAULT NULL,
> +  prio            INT DEFAULT NULL,
> +  change_date     INT DEFAULT NULL,
> +  primary key(id),
> +  CONSTRAINT `records_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domains` (`id`) ON DELETE CASCADE
> +) type=InnoDB");
> +
> +$DB->Execute("CREATE INDEX rec_name_index ON records(name)");
> +$DB->Execute("CREATE INDEX nametype_index ON records(name,type)");
> +$DB->Execute("CREATE INDEX domain_id ON records(domain_id)");
> +
> +$DB->Execute("create table supermasters (
> +  ip VARCHAR(25) NOT NULL,
> +  nameserver VARCHAR(255) NOT NULL,
> +  account VARCHAR(40) DEFAULT NULL
> +)");
> +
> +$DB->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2009103000', 'dbversion'));
> +
> +?>

	Witam, nie bardzo podoba mi się to rozwiązanie z wrzucaniem do
struktury bazy pól, które są wykorzystywane tylko przez powerDNS. Dużo
lepszym rozwiązaniem byłoby zrobienie struktury ogólnej i ew. widoku, z
którego korzystałby powerDNS. Brakuje też pliku aktualizacji bazy dla
Postgresa, dokumentacji do nowych pól w bazie i zmian w plikach
doc/lms.psql i doc/lms.mysql. Wg mnie w takiej postaci poprawka ta nie
nadaje się do CVSa.

- --
Pozdrawiam
Grzegorz Chwesewicz
mailto:grzegorz.chwesewicz w retis.net.pl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJK6/eRAAoJEFDVa/ILFWaCZxMH/1JVfBheNuB4vuA8g7lm0OEa
jZMS8DLeeMkvCieykxLGAyAxErmfYWea3io8y3sx2KNKW5Paca/Hm7R0Rw4dTvsG
lIzvpX9jvjGPkpPFFr6olbTgvyfGNklsJgfWNXGTyb8VROXu6eSffe017T6adSKZ
oU7g7Juv+ullpuoxp6Plt3zxTklNygsQEoRsjRj1rXAu2v+6K2QbDjybtjsYLEAu
0rBAYRSi7EycHVmaMvt4OKg6L4WrF/SMfGE2vV7ubvHjan5TCOapVRSR0gOXErR+
CC2MQpbzNpfY+JX1eqA50Q38FHeNC+bI6HCAvWr6+f9fLdvzipZ96mhN4zbzagg=
=kr/+
-----END PGP SIGNATURE-----



Więcej informacji o liście lms-dev