From bd8a2dbfd68289a4f025964647320f8ef5e857aa Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 24 Aug 2009 11:23:02 -0400 Subject: test script for schema code --- scripts/showtable.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/showtable.php (limited to 'scripts/showtable.php') diff --git a/scripts/showtable.php b/scripts/showtable.php new file mode 100644 index 000000000..30f0bb5a9 --- /dev/null +++ b/scripts/showtable.php @@ -0,0 +1,41 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); + +$helptext = << +Shows the structure of a table + +END_OF_SHOWTABLE_HELP; + +require_once INSTALLDIR.'/scripts/commandline.inc'; + +if (count($args) != 1) { + show_help(); +} + +$name = $args[0]; + +$schema = Schema::get(); + +$td = $schema->getTableDef($name); + +print_r($td); -- cgit v1.2.3-54-g00ecf From e206324f245145a0e8c9ec0535cba1d62344ebf7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 23 Sep 2009 09:20:04 -0400 Subject: statusize schema-related modules --- lib/schema.php | 18 +++++++++--------- scripts/showtable.php | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'scripts/showtable.php') diff --git a/lib/schema.php b/lib/schema.php index 624765eb2..d3b30aeeb 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -1,6 +1,6 @@ . * * @category Database - * @package Laconica - * @author Evan Prodromou - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } @@ -39,10 +39,10 @@ if (!defined('LACONICA')) { * utilities. * * @category Database - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class Schema diff --git a/scripts/showtable.php b/scripts/showtable.php index 30f0bb5a9..eb18a98e2 100644 --- a/scripts/showtable.php +++ b/scripts/showtable.php @@ -1,8 +1,8 @@ #!/usr/bin/env php