AnsweredAssumed Answered

Creating Database Objects with Building Blocks

Question asked by arturo.llanos.bb on Nov 7, 2015
Latest reply on Nov 10, 2015 by moneil

I am trying to develop a B2 that creates a custom table in the BBLEARN_STATS Schema per these 2 articles:

"Creating Database Objects with Building Blocks - EduGarage (Blackboard Developers Network) - Confluence "

"Schema Definitions - EduGarage (Blackboard Developers Network) - Confluence "

 

However the table is not created when I install the B2 (I enabled on Learn the setting to allow the B2's to create DB objects), this is basically what I do:

 

______These are the files and folders I created under the WEB_INF folder, the bb_ts_group has the table as a feed file with pipe separator_______

......../WEB_INF/schema/datatemplates/bb_ts_group.txt

......../WEB_INF/schema/table_definitions/schema.xml

 

______File: bb_ts_group.tx_______
PK1|GROUP
1|groupname1
2|groupname2
3|groupname3

 

_______File: bb-manifest.xml________
<?xml version="1.0" encoding="ISO-8859-1"?>
<manifest>
  <!-- core extension information -->
    <plugin>

....................etc.....................

    </plugin>
<!--  Custom DB tables -->
<schema-dirs>
        <schema-dir dir-name="table_definitions" database="stats" />
</schema-dirs>
</manifest>

 

______File: schema.xml______
<?xml version="1.0" encoding="UTF-8"?>

<!-- Table Definitions -->
<schema>
<schema-dir dir-name="datatemplates" />
<table name="bb_ts_group">
    <!-- Primary Key: this is the surrogate primary key for the table (int maps to NUMBER(38,0)) -->
      <primary-key name="bb_ts_group_pk" comment="[Table:bb_ts_group][Primary-key:bb_ts_group_pk] on Column pk1">
     <columnref name="pk1" />
      </primary-key>
    <!-- group (varchar(255) and nvarchar(255) for input and multibyte - VARCHAR2(255 BYTE)) -->
    <column name="GROUP" data-type="nvarchar(255)" nullable="false" default="'.'" identity="false" />   
</table>
</schema>

 

While I wrote this post I realized of one thing  that was wrong and fixed it, so I still have a couple of things to try, however if anybody with experience can easily see what is missing, I would appreciate it.

Outcomes