Adding Information To pluto media: Difference between revisions
Appearance
New page: pluto_media contains a mix of media information relevant for the local install, and configuration information relevant for the building of packages. pluto_media updates to the configuratio... |
Added example on how to add an entry to MediaSource |
||
| Line 3: | Line 3: | ||
After amending the MySQL database pluto_media on schema.linuxmce.org, sqlCVS needs to be run on schema and the psc IDs need to be updated by selecting update-psc | After amending the MySQL database pluto_media on schema.linuxmce.org, sqlCVS needs to be run on schema and the psc IDs need to be updated by selecting update-psc | ||
sqlCVS -D pluto_media update-psc | sqlCVS -D pluto_media update-psc | ||
== Example of adding a record to pluto_media.MediaSource == | |||
We need to add a new type of MediaSource to the system. This is, how it was done: | |||
[root@lmce-svn ~]# mysql pluto_media | |||
Reading table information for completion of table and column names | |||
You can turn off this feature to get a quicker startup with -A | |||
Welcome to the MySQL monitor. Commands end with ; or \g. | |||
Your MySQL connection id is 68301 | |||
Server version: 5.0.45 Source distribution | |||
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | |||
mysql> select * from MediaSource; | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
| PK_MediaSource | Description | Define | psc_id | psc_batch | psc_user | psc_frozen | psc_mod | psc_restrict | | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
| 1 | Hard Drives | NULL | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 2 | Discs & Jukeboxes | NULL | 2 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 3 | Bookmarks | NULL | 3 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
3 rows in set (0.00 sec) | |||
mysql> insert into MediaSource (Description) Values ("Downloadable"); | |||
Query OK, 1 row affected (0.01 sec) | |||
mysql> select * from MediaSource; | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
| PK_MediaSource | Description | Define | psc_id | psc_batch | psc_user | psc_frozen | psc_mod | psc_restrict | | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
| 1 | Hard Drives | NULL | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 2 | Discs & Jukeboxes | NULL | 2 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 3 | Bookmarks | NULL | 3 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 4 | Downloadable | NULL | NULL | NULL | NULL | 0 | 2009-09-09 12:26:05 | NULL | | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
4 rows in set (0.00 sec) | |||
mysql> \q | |||
Bye | |||
[root@lmce-svn ~]# /usr/pluto/bin/sqlCVS -D pluto_media update-psc | |||
Copyright (C) 2004 Pluto, Inc., a Florida Corporation | |||
www.plutohome.com | |||
Phone: +1 (877) 758-8648 | |||
This program is distributed according to the terms | |||
of the Pluto Public License, available at: | |||
http://plutohome.com/index.php?section=public_license | |||
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 Pluto Public License for more details. | |||
------- | |||
Database host:localhost user:root pass: name:pluto_media port:3306 | |||
Users: | |||
Updating repository 'media' schema version from: 43 | |||
[root@lmce-svn ~]# mysql pluto_media -e "select * from MediaSource" | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
| PK_MediaSource | Description | Define | psc_id | psc_batch | psc_user | psc_frozen | psc_mod | psc_restrict | | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
| 1 | Hard Drives | NULL | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 2 | Discs & Jukeboxes | NULL | 2 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 3 | Bookmarks | NULL | 3 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL | | |||
| 4 | Downloadable | NULL | 4 | NULL | NULL | 0 | 2009-09-09 12:26:34 | NULL | | |||
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+ | |||
[root@lmce-svn ~]# | |||
Revision as of 10:28, 9 September 2009
pluto_media contains a mix of media information relevant for the local install, and configuration information relevant for the building of packages. pluto_media updates to the configuration, like the MediaSource table, needs to be re-done on the main mysql server (currently located at schema.linuxmce.org).
After amending the MySQL database pluto_media on schema.linuxmce.org, sqlCVS needs to be run on schema and the psc IDs need to be updated by selecting update-psc
sqlCVS -D pluto_media update-psc
Example of adding a record to pluto_media.MediaSource
We need to add a new type of MediaSource to the system. This is, how it was done:
[root@lmce-svn ~]# mysql pluto_media
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 68301
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select * from MediaSource;
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| PK_MediaSource | Description | Define | psc_id | psc_batch | psc_user | psc_frozen | psc_mod | psc_restrict |
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| 1 | Hard Drives | NULL | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 2 | Discs & Jukeboxes | NULL | 2 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 3 | Bookmarks | NULL | 3 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
3 rows in set (0.00 sec)
mysql> insert into MediaSource (Description) Values ("Downloadable");
Query OK, 1 row affected (0.01 sec)
mysql> select * from MediaSource;
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| PK_MediaSource | Description | Define | psc_id | psc_batch | psc_user | psc_frozen | psc_mod | psc_restrict |
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| 1 | Hard Drives | NULL | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 2 | Discs & Jukeboxes | NULL | 2 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 3 | Bookmarks | NULL | 3 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 4 | Downloadable | NULL | NULL | NULL | NULL | 0 | 2009-09-09 12:26:05 | NULL |
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
4 rows in set (0.00 sec)
mysql> \q
Bye
[root@lmce-svn ~]# /usr/pluto/bin/sqlCVS -D pluto_media update-psc
Copyright (C) 2004 Pluto, Inc., a Florida Corporation
www.plutohome.com
Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
http://plutohome.com/index.php?section=public_license
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 Pluto Public License for more details.
-------
Database host:localhost user:root pass: name:pluto_media port:3306
Users:
Updating repository 'media' schema version from: 43
[root@lmce-svn ~]# mysql pluto_media -e "select * from MediaSource"
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| PK_MediaSource | Description | Define | psc_id | psc_batch | psc_user | psc_frozen | psc_mod | psc_restrict |
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
| 1 | Hard Drives | NULL | 1 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 2 | Discs & Jukeboxes | NULL | 2 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 3 | Bookmarks | NULL | 3 | NULL | NULL | 0 | 0000-00-00 00:00:00 | NULL |
| 4 | Downloadable | NULL | 4 | NULL | NULL | 0 | 2009-09-09 12:26:34 | NULL |
+----------------+-------------------+--------+--------+-----------+----------+------------+---------------------+--------------+
[root@lmce-svn ~]#