Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
adding the schema.php
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/21/09 07:01 
What files take part in adding the schema file to the db I have 3 tables and none of the tables are being added in this last module I am trying to build I have checked over the schema.php file over a hundred times over the last 2 or 3 weeks and it looks to be right. I compared it to other schema files and everything matches up including all of the symbols. I did notice to add the extra tables to the include.php "Define Custom Tables" area. Are there any other files that have to do with adding the tables upon running the integrity check. When I run it my module shows up at the bottom but when I check the db the tables are not added.


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/21/09 08:47 

jamesd116:
What files take part in adding the schema file to the db I have 3 tables and none of the tables are being added in this last module I am trying to build I have checked over the schema.php file over a hundred times over the last 2 or 3 weeks and it looks to be right. I compared it to other schema files and everything matches up including all of the symbols. I did notice to add the extra tables to the include.php "Define Custom Tables" area. Are there any other files that have to do with adding the tables upon running the integrity check. When I run it my module shows up at the bottom but when I check the db the tables are not added.


Make sure you have defined the table names in your module's include.php file.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/21/09 09:30 
this has been done but it does not work

Code
// Define custom database tables
$jamroom_db['rt_library'] = $config['db_prefix'].'rt_library';
$jamroom_db['rt_carriers'] = $config['db_prefix'].'rt_carriers';
$jamroom_db['rt_userips'] = $config['db_prefix'].'rt_userips';



_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/21/09 13:45 
Put:

fdebug($jamroom_db);

in your schema.php file, and then run an integrity check and look in your logs/ directory for jr_debug_log and check to see if the table names show up there. (Then remove fdebug)


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/21/09 15:49 
nope nothing showed eup in the logs file


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/21/09 19:26 
And you have an include.php file in your module's directory? That's the file that Jamroom needs to see that it is a module.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/21/09 20:23 

smith.kyle:
And you have an include.php file in your module's directory? That's the file that Jamroom needs to see that it is a module.


Yes I have the include.php file and it defines the tables within it I have went over the include file over and over and over again making sure that everything was cottect in it.


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/21/09 21:39 
Do you have any php errors? If they are in the module's include.php file then it should be working.


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/21/09 22:07 
no errors in the php error log and the activity log itself is not working for me


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 06/22/09 01:23 
I don't think you get any errors if the sql doesn't run properly, that would be the first place I'd check.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/22/09 10:53 

SteveX:
I don't think you get any errors if the sql doesn't run properly, that would be the first place I'd check.


If errors are encountered in the SQL when trying to write to the log table, then it is logged to the jamroom/logs/jr_debug_log

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
dagilli



Joined: 07 Sep 2007
Posts: 213
Location: Seattle

Posted: 06/22/09 16:47 
make sure to have:

dbVerifyTable($jamroom_db['rt_********'],$tbl);

at the end of all the CREATE TABLE statements in the schema.php

Of course the ****** is your new table names....


_________________
"With No Music, There Could Be No Harvest"
* AFRIJAM *
* Freelance Coding *
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/22/09 18:43 

dagilli:
make sure to have:

dbVerifyTable($jamroom_db['rt_********'],$tbl);

at the end of all the CREATE TABLE statements in the schema.php

Of course the ****** is your new table names....


Yes its there on all 3 tables


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 06/22/09 22:49 
Here is the code I have right now if something looks wrong please tell me


Code
<?php
/**
 * Jamroom rtCreator module Schema file
 * @copyright 2009 by 4Spotlight.com
 * @author James Dallas - admin_support@ecmunlimited.com
 */
defined('IN_JAMROOM') or exit();

// library
$tbl = "CREATE TABLE {$jamroom_db['rt_library']} (
  memberid INT(14) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  extension VARCHAR(255) NOT NULL DEFAULT '', 
  name VARCHAR(255) NOT NULL DEFAULT '', 
  user VARCHAR(255) NOT NULL DEFAULT '',
  filename VARCHAR(255) NOT NULL DEFAULT '', 
  servername VARCHAR(255) NOT NULL DEFAULT '',
  length VARCHAR(255) NOT NULL DEFAULT '',
  PRIMARY KEY (MEMBERID))
";
dbVerifyTable($jamroom_db['rt_library'],$tbl);

// carriers
$tbl = "CREATE TABLE {$jamroom_db['rt_carriers']} (
  number INT(14) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  extension VARCHAR(255) NOT NULL DEFAULT '', 
  name VARCHAR(255) NOT NULL DEFAULT '', 
  PRIMARY KEY (NUMBER))
";
dbVerifyTable($jamroom_db['rt_carriers'],$tbl);

// userips
$tbl = "CREATE TABLE {$jamroom_db['rt_userips']} (
  number INT(14) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
  ip VARCHAR(255) NOT NULL DEFAULT '', 
  hits VARCHAR(255) NOT NULL DEFAULT '', 
  time VARCHAR(100) NOT NULL DEFAULT '',
  PRIMARY KEY (NUMBER))
";
dbVerifyTable($jamroom_db['rt_userips'],$tbl);

// Jamroom Quota
$tbl = "
  quota_rtCreator_access CHAR(3) NOT NULL DEFAULT 'no'
";
dbVerifyTable($jamroom_db['quota'],$tbl);

fdebug($jamroom_db);

?>



_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 06/22/09 23:10 
Does your quota_rtCreator_access column get added to the Quota table?


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

12Next >
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.