thejsj / rethinkdb-init

Create all RethinkDB databases, tables and indexes automatically through a schema object.
https://www.npmjs.com/package/rethinkdb-init
53 stars 15 forks source link

Support post-install table creation #14

Open aabrams opened 8 years ago

aabrams commented 8 years ago

In our app, table creation is done per module at module init phase, separate from db connection init.

Could an API be made for that?

thejsj commented 8 years ago

Let me see if I understand the use case correctly:

Does that sound about right? If not, could you explain the use case more clearly and maybe provide a more detailed explanation of what the API would look like.

Happy to take a look.

aabrams commented 8 years ago

What you described sounds exactly right, we share the same connection.

On Sun, Jun 12, 2016, 20:56 Jorge Silva notifications@github.com wrote:

Let me see if I understand the use case correctly:

  • You have one app connecting to rethinkdb
  • Instead of creating tables in one place, you create them in multiple places depending on module responsibility and scope
  • You want to create tables in each module using the same connection you use everywhere else

Does that sound about right? If not, could you explain the use case more clearly and maybe provide a more detailed explanation of what the API would look like.

Happy to take a look.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thejsj/rethinkdb-init/issues/14#issuecomment-225450972, or mute the thread https://github.com/notifications/unsubscribe/AAYBoIlNEKjn0tnRp9tfMxqWLp_u5umvks5qLEg9gaJpZM4Ixv4b .

thejsj commented 8 years ago

This should be pretty simple, let me see if I can try making that part of the API public in some way.

aabrams commented 8 years ago

Thanks!

On Mon, Jun 13, 2016, 20:38 Jorge Silva notifications@github.com wrote:

This should be pretty simple, let me see if I can try making that part of the API public in some way.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thejsj/rethinkdb-init/issues/14#issuecomment-225653878, or mute the thread https://github.com/notifications/unsubscribe/AAYBoLsfNRNxGvUpralkG-2y9Q1vfEx0ks5qLZWwgaJpZM4Ixv4b .