Skip to content

Commit be0f2f7

Browse files
Add removing of Keyspace creation ddl from astra apply to instance script
1 parent d3d5470 commit be0f2f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

forward_engineering/helpers/dbConnectionService/applyToInstance.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
const applyToInstance = (cassandraHelper) => (connectionInfo, logger, app) => {
2-
const script = connectionInfo.script;
2+
let script = connectionInfo.script;
3+
if(connectionInfo.clusterType === 'apolloCloud'){
4+
const usePosition = script.indexOf('USE');
5+
script = script.substring(usePosition)
6+
}
37
const cassandra = cassandraHelper(app.require('lodash'));
48

59
return cassandra.connect(app)(connectionInfo)

0 commit comments

Comments
 (0)