lukeed / ley

(WIP) Driver-agnostic database migrations
MIT License
260 stars 14 forks source link

Configure "migrations" table name #5

Open lishine opened 4 years ago

lishine commented 4 years ago

Hi,

Trying to use the extension. Looked at the code and I see that is updated migrations table. But what if I don't want to update migrations table or to update another table, what to do? Because I am actually adding features to a db that not me managing, so I don't want to touch tables other than these I am creating.

lukeed commented 4 years ago

The table name is not configurable. Are you saying that you have a name conflict with your existing database?

Otherwise, there's no need to touch anything ley is doing – since that's kinda the point

lishine commented 4 years ago

Currently I see that they don't have such a table. Probably, if we will work together we will agree on migration tool. But for the meantime I just don't want to interfere. migrations is such a common name for a table, I suppose

lukeed commented 4 years ago

Migrations is common for migrations, which is what ley is managing 😆

Sorry, I don't understand what the issue/ticket is about.

lishine commented 4 years ago

BTW about env variables, I saw you wrote this in postgres repo : ley -r dotenv/config up But would this work, seems like it is not working:

In package scripts

export $(cat ./.env | xargs) && node ley --dir ./db/migrations --length 2

Or

#!/bin/bash

source .env
ley --dir ./db/migrations --length 2 $*
lishine commented 4 years ago

Migrations is common for migrations, which is what ley is managing

Sorry, I don't understand what the issue/ticket is about.

Be able to set the table name