Welcome Guest, Not a member yet? Register   Sign In
Database Forge create table format
#1

[eluser]joytopia[/eluser]
Hi all,

how can I set the table format when creating a new table with Database Forge?
I searched in the manual and googled but did not find anything about that.

Thanks, Bernd
#2

[eluser]InsiteFX[/eluser]
Here you go!

Create Table and Fields

Enjoy
InsiteFX
#3

[eluser]joytopia[/eluser]
[quote author="InsiteFX" date="1269003831"]Here you go!

Create Table and Fields

Enjoy
InsiteFX[/quote]

Thanks,InsiteFX, I had read this.
But where do I define myISAM or InnoDB when I want to create a table?
#4

[eluser]InsiteFX[/eluser]
Hi,

I just went through the CI_Database code it does not allow for the database type.

By default the dabase driver is in the database config file which would be mysql.

Looks like this should be an added feature to DBForge.

I am a little bit busy right now, but if you really need this I could write a
library to handle this for you.

Enjoy
InsiteFX
#5

[eluser]joytopia[/eluser]
Hi,

probably it would be a good idea, to add the TYPE as optional parameter to Database Forge.
Or at least in the config file, it should be possible to set the default TYPE.

In my application I only use mySQL. I want to make remote upgrades to several instances of the application.

So perhaps it is the simplest make a sql query like this:

Code:
$query = $this->db->query("

        CREATE TABLE IF NOT EXISTS `test` (
          `id` mediumint(8) unsigned NOT NULL auto_increment,          
          PRIMARY KEY  (`id`)
        ) TYPE=InnoDB;

");

Best regards
Bernd




Theme © iAndrew 2016 - Forum software by © MyBB