Skip to content
#

orm

Here are 2,546 public repositories matching this topic...

jy95
jy95 commented Dec 29, 2019

Issue Description

Is your feature request related to a problem? Please describe.

When doing some migrations, I would like to delete a column created in a previous migration.
However, this is not possible with the current code for some scenarios.

An example :
migration v3

'use strict';

let opts = {tableName: 'Exercises'};

module.exports = {
    up: (queryInterf
fEyebrow
fEyebrow commented May 10, 2019

Describe the bug
When the elevated database user account does not have permission to create a schema, it cannot establish a connection with an existing database.

But when I provided the root account, I successfully established a connection with the database, but prisma created a schema called prisma.
Look like this:
![image](https://user-images.githubusercontent.com/18180417/57507662-fc

qsdfplkj
qsdfplkj commented May 3, 2020

I'm tracking a transaction by it's TransactionId. I've noticed it changes when UseTransaction of the RelationalConnection is called.

Why does the UseTransaction create a new TransactionId?

Maybe it ain't broken or can't be fixed because the transactionId is on the IDbContextTransaction and the DbTransaction doesn't support it then maybe UseTransacton(IDbContextTransaction transaction) can

frames75
frames75 commented Feb 19, 2020

In the tutorial events there is this example:

const User = bookshelf.model('User', {
  tableName: 'users',

  initialize() {
    this.on('saving', (model) => {
      return User.forge({email: model.get('email')}).fetch().then((user) => {
        if (user) 
            throw new Error('That email address already exists')
    
sgrif
sgrif commented Feb 18, 2020

Given that we support CURRENT_TIMESTAMP, the lack of CURRENT_DATE feels like an omission. While you can hack it with date(now), I keep finding myself wishing there was a direct way to reference this. Given that now means CURRENT_TIMESTAMP, I think there's precedent for today meaning CURRENT_DATE. This is supported by all backends we support (and is in the ISO standard I believe).

spitzbubchen
spitzbubchen commented Aug 18, 2016

I've been accessing my other database just fine using db_alias for most collections that do not contain FileField() or ImageField() fields. However, for collections with FileField() or ImageField() I have not been able to access the file in the other database. Does db_alias not properly link fs.files and fs.chunks in the other database? Must one somehow add `meta = {"db_alias": "OtherDB"

videni
videni commented Sep 29, 2019

what is prefer way to add relation and remove relation? I found example as below, but I did't find any document about the two methods.

 case 'ADD_AUTHOR_TO_BOOK':
        Book.withId(action.payload.bookId).authors.add(action.payload.author);  // add new entity ,  add relation?  this doesn't work.
        break;
    case 'REMOVE_AUTHOR_FROM_BOOK':
        Book.withId(action.payload.bo

Improve this page

Add a description, image, and links to the orm topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the orm topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.